TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Norvig's Python programs to practice or demonstrate skills

937 点作者 federicoponzi超过 7 年前

15 条评论

throwaway7645超过 7 年前
Norvig is a beast. For those that don't know, he is high up in Google Research (AI director I believe) and also wrote the #1 AI textbook. He has the #1 AI course on coursera or edx too (can't remember which one). He's a big lisp advocate (look at his review of SICP on amazon), but also has the programs for his books in Java, and Python.
评论 #15788623 未加载
评论 #15787848 未加载
评论 #15787505 未加载
评论 #15787737 未加载
评论 #15789025 未加载
deepGem超过 7 年前
His Design of Computer programs course on Udacity is amazing.<p><a href="https:&#x2F;&#x2F;in.udacity.com&#x2F;course&#x2F;design-of-computer-programs--cs212" rel="nofollow">https:&#x2F;&#x2F;in.udacity.com&#x2F;course&#x2F;design-of-computer-programs--c...</a>
评论 #15787888 未加载
评论 #15788014 未加载
Myrmornis超过 7 年前
Literate programming &#x2F; ipython notebooks make me very uncomfortable.<p>Primarily the problem is that it&#x27;s a living body of mutable state -- like an Excel spreadsheet, except it doesn&#x27;t auto-update -- if I poke at some bit of it, and then re-evaluate a cell, some state will change, probably. And then maybe other cells&#x27; outputs will be invalid. Hmm, maybe I should re-evaluate the whole notebook? Oh, but some of the cells contain shell commands, for example to download a dictionary file from norvig.com. Do I want to do that? Maybe I should just undo the change I made. The ipynb is in git of course. But instead of a nice diff showing lines of code, the python code is held inside some JSON document.<p>Ipython notebook is beautiful technology, the front-end is really-well done. But accumulating all that mutable state goes against all my instincts as a programmer. I prefer editing .py files in my text editor, with Make when necessary. And then creating output from input with a single, transient, execution.
评论 #15793095 未加载
评论 #15790164 未加载
carreau超过 7 年前
You can run these notebooks for free in the cloud (on MyBinder.org provided by the Jupyter team). Just head there: <a href="https:&#x2F;&#x2F;mybinder.org&#x2F;v2&#x2F;gh&#x2F;norvig&#x2F;pytudes&#x2F;master" rel="nofollow">https:&#x2F;&#x2F;mybinder.org&#x2F;v2&#x2F;gh&#x2F;norvig&#x2F;pytudes&#x2F;master</a> You may need to `pip install numpy`. Watch out images are ephemeral.
评论 #15797933 未加载
评论 #15787716 未加载
评论 #15792015 未加载
评论 #15788186 未加载
jypepin超过 7 年前
Norvig&#x27;s notebooks are my favorite resource for code reading. He has so much of them, written is such a nice, clean, clever but yet understandable and readable way, it&#x27;s always a pleasure and amazing learning experience to go through them.<p>For example, going through his notebook for code advent (the first linked) [1].<p>[1] <a href="https:&#x2F;&#x2F;nbviewer.jupyter.org&#x2F;url&#x2F;norvig.com&#x2F;ipython&#x2F;Advent%20of%20Code.ipynb" rel="nofollow">https:&#x2F;&#x2F;nbviewer.jupyter.org&#x2F;url&#x2F;norvig.com&#x2F;ipython&#x2F;Advent%2...</a>
cdancette超过 7 年前
I really like his (How to Write a (Lisp) Interpreter (in Python)) : <a href="http:&#x2F;&#x2F;norvig.com&#x2F;lispy.html" rel="nofollow">http:&#x2F;&#x2F;norvig.com&#x2F;lispy.html</a><p>You learn to build a lisp interpreter in about 100 lines of python (you miss a few features like macros, but it&#x27;s still quite complete). Very nice to learn how language interpretation works
评论 #15788230 未加载
pvg超过 7 年前
&#x27;Etudes for Programmers&#x27; itself remains an interesting read and entertaining problem set. And not a single one is about implementing a Red-Black tree from memory.
评论 #15791377 未加载
评论 #15788903 未加载
rb808超过 7 年前
Is the adventofcode.com fun&#x2F;educational&#x2F;worthwhile? I see it starts again Dec 1. I like doing things like this but end up regretting it as it sucks too much time solving unnecessary problems.
评论 #15788039 未加载
评论 #15788059 未加载
评论 #15797636 未加载
brian_spiering超过 7 年前
Here is code for &quot;Artificial Intelligence: A Modern Approach&quot; <a href="https:&#x2F;&#x2F;github.com&#x2F;aimacode" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;aimacode</a><p>Norvig wrote some of the Python version <a href="https:&#x2F;&#x2F;github.com&#x2F;aimacode&#x2F;aima-python" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;aimacode&#x2F;aima-python</a>
评论 #15795532 未加载
kwillets超过 7 年前
His regex golf seems kind of strange; he never mentions suffix trees. It seems like a fairly straightforward process to go through and mark the shortest distinguishing infix for each string in a generalized suffix tree.
ticotico超过 7 年前
What would be a similar resource but for Ruby?
评论 #15796194 未加载
dfee超过 7 年前
The algorithms I browsed make sense, but his coding style is peculiar, and somewhat un-pythonic.<p>For instance: <a href="https:&#x2F;&#x2F;github.com&#x2F;norvig&#x2F;pytudes&#x2F;blob&#x2F;master&#x2F;py&#x2F;SET.py" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;norvig&#x2F;pytudes&#x2F;blob&#x2F;master&#x2F;py&#x2F;SET.py</a><p>Why the CAPS name? Why are we defining `test` if we’re just running it on the next line - or rather, why are running the test in that same file as it’s definition, and then running an example 100k times?<p>Any professional python developer will know this, but when an adventuring friend calls me to help him debug something, with code modeled on what he’s seen in examples like these, I’ll likely just throw my hands up.<p>On the flip side, this isn’t bad for showing how something works, and the cognitive overload for a beginner to “get to the meat” if he’d used `argparse` or `click` might be a bit high.
评论 #15793528 未加载
评论 #15800981 未加载
评论 #15794953 未加载
fastbeef超过 7 年前
Kind of OT, but... according to his CV Norvig was the Chief Designer for Harlequin?!<p><a href="http:&#x2F;&#x2F;norvig.com&#x2F;resume.html" rel="nofollow">http:&#x2F;&#x2F;norvig.com&#x2F;resume.html</a>
bhollan超过 7 年前
Am I the only one getting 500 for this link?
评论 #15792951 未加载
评论 #15792956 未加载
b0rsuk超过 7 年前
I get it that Peter Norvig is a very smart programmer. But can someone explain to me - like a farmer to his cow - how do these resources differ from typical programming challenges found on the web ?<p>How will these make me a better programmer ? Is each designed to teach a different programming concept or technique ? Are they useful in fields lower than machine learning or AI ?<p>What&#x27;s the benefit of a program that detects palindromes ?
评论 #15790498 未加载
评论 #15790568 未加载
评论 #15789952 未加载
评论 #15790056 未加载