<jupyter_start><jupyter_text>Python编程环境  Guido Van Rossum和版本   [Guido](https://gvanrossum.github.io/)是[Python](https://www.python.org/)的作者![avatar](http://bazhou.blob.core.windows.net/learning/mpp/guido.jpg) 在下面的访谈中，[<NAME>](https://en.wikipedia.org/wiki/Peter_Norvig)也没有念对他的名字，Guido的主页有它的荷兰语发音。  >他在[stackoverflow](https://stackoverflow.com/users/818274/guido-van-rossum)和[github](https://github.com/gvanrossum)上非常活跃。他的[twitter](https://twitter.com/gvanrossum)更新很勤。![Guido_twitter](http://bazhou.blob.core.windows.net/learning/mpp/guido_tweet_996.png) - 抛开Python的[前世、今生和未来](http://bazhou.blob.core.windows.net/learning/mpp/python-past-present-and-future-with-guido-van-rossum.mp3) 第一个现实问题是：版本。- Python有两个版本：2和3。- 我们用版本3，再确切些，3.6.5。- 版本问题会引起很大的麻烦，这门课的解决方法是Docker。  我们使用Python[3.6](https://docs.python.org/3/whatsnew/3.6.html)![py3ver](http://bazhou.blob.core.windows.net/learning/mpp/py3ver.gif)  Shell Script  REPL - Shell 命令输入处 - Script 命令 - REPL Read-Evaluate-Print-Loop  挑战：获得这门课程的词汇表 - 17段视频的字幕文件 ![shell_challenge](http://bazhou.blob.core.windows.net/learning/mpp/shell_challenge.gif) - 输入数据[例子](http://bazhou.blob.core.windows.net/learning/mpp/msxpy/16_253_6.2-wCnbczfN91s.txt)400:00:14,010 --> 00:00:19,009In practice, you'll be working with data ofdifferent types: numerical values, strings,500:00:19,009 --> 00:00:21,279booleans and so on. - 用管道连接脚本 ```bashcat *.txt|./clean.sh 清洗字幕文件，分词``` ```bashcat *.txt|./clean.sh|sort|uniq 去掉重复，排序``` ```bashcat *.txt|./clean.sh|sort|uniq|wc 统计单词数``` - 清洗字幕脚本 [clean.sh](http://bazhou.blob.core.windows.net/learning/mpp/msxpy/clean.sh)```bash!/bin/shtr '[:blank:]' '\n'|tr '[:upper:]' '[:lower:]'|tr -d '\r'|grep -vE "'"|grep -vE "\."|tr -d '[:punct:]'|grep -vE "^[^a-zA-Z].*"|grep -vE ".*[0-9].*"```  Jupyter[命名](https://news.ycombinator.com/item?id=16978364)![jupiter](http://bazhou.blob.core.windows.net/learning/mpp/jupiter.jpg)  Jupyter>Jupyter像Shell一样，在cell里编辑，在cell里运行，循环往复- R 编辑cell，Enter- E 运行cell，Shift+Enter- P 打印cell- L 下个cell<jupyter_code>print("hello world")<jupyter_output>hello world
{'fraction_non_alphanumeric': 0.2099609375, 'fraction_numerical': 0.0400390625, 'mean_word_length': 5.898989898989899, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 8, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '189368', 'license': 'Apache-2.0', 'n_tokens_mistral': 1067, 'n_tokens_neox': 1042, 'n_words': 82, 'path': '基础教程/A1-Python与基础知识/Python基础/01_编程环境.ipynb', 'repo_name': 'microsoft/ai-edu', 'size': '2054'}