科研帝上线啦!115万本专业的英文电子书全部免费下载!

科研帝

 找回密码
 立即注册

手机号码,快捷登录

金币不够用?来这充值VIP学者,无限量下载
查看: 400|回复: 5

Head First Python-[1]-[2010]-[pdf]-[Paul Barry]

[复制链接]
  • TA的每日心情
    开心
    2018-10-7 11:51
  • 签到天数: 68 天

    [LV.6]常住居民II

    23

    主题

    113

    帖子

    229

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    金币
    1497
    关注领域
    物理学
    QQ
    发表于 2017-11-14 17:38:42 | 显示全部楼层 |阅读模式
    提示:本书回复后可见下载链接(点击链接后等待30秒内会自动启动下载),普通用户回复扣5金币,VIP用户免费下载。还不是VIP?点击这里加入VIP→


    免费下载30页预览文件

    书籍信息:
    标题: Head First Python  
    语言: English
    格式: pdf
    大小: 37.8M
    页数: 494
    年份: 2010
    作者: Paul Barry
    版次: 1
    出版社: O'Reilly Media

    简介

    Ever wished you could learn Python from a book? Head First Python is a complete learning experience for Python that helps you learn the language through a unique method that goes beyond syntax and how-to manuals, helping you understand how to be a great Python programmer. You'll quickly learn the language's fundamentals, then move onto persistence, exception handling, web development, SQLite, data wrangling, and Google App Engine. You'll also learn how to write mobile apps for Android, all thanks to the power that Python gives you. We think your time is too valuable to waste struggling with new concepts. Using the latest research in cognitive science and learning theory to craft a multi-sensory learning experience, Head First Python uses a visually rich format designed for the way your brain works, not a text-heavy approach that puts you to sleep.


    目录
    Table of Contents......Page 11
    How to use this book: Intro......Page 25
    Who is this book for?......Page 26
    We know what your brain is thinking......Page 27
    Metacognition: thinking about thinking......Page 29
    Here’s what WE did:......Page 30
    Here’s what YOU can do to bend your brain into submission......Page 31
    Read Me......Page 32
    The technical review team......Page 34
    Acknowledgments......Page 35
    Safari® Books Online......Page 36
    1. Meet Python: Everyone Loves Lists......Page 37
    What’s to like about Python?......Page 38
    Install Python 3......Page 39
    Use IDLE to help learn Python......Page 40
    Work effectively with IDLE......Page 41
    Deal with complex data......Page 42
    Create simple Python lists......Page 43
    Lists are like arrays......Page 45
    Add more data to your list......Page 47
    Work with your list data......Page 51
    For loops work with lists of any size......Page 52
    Store lists within lists......Page 54
    Check a list for a list......Page 56
    Complex data is hard to process......Page 59
    Handle many levels of nested lists......Page 60
    Don’t repeat code; create a function......Page 64
    Create a function in Python......Page 65
    Recursion to the rescue!......Page 67
    Your Python Toolbox......Page 68
    2. Sharing Your Code: Modules of Functions......Page 69
    It’s too good not to share......Page 70
    Turn your function into a module......Page 71
    Modules are everywhere......Page 72
    Comment your code......Page 73
    Prepare your distribution......Page 76
    Build your distribution......Page 77
    A quick review of your distribution......Page 78
    Import a module to use it......Page 79
    Python’s modules implement namespaces......Page 81
    Register with the PyPI website......Page 83
    Upload your code to PyPI......Page 84
    Welcome to the PyPI community......Page 85
    With success comes responsibility......Page 86
    Life’s full of choices......Page 87
    Control behavior with an extra argument......Page 88
    Before your write new code, think BIF......Page 89
    Python tries its best to run your code......Page 93
    Trace your code......Page 94
    Work out what’s wrong......Page 95
    Update PyPI with your new code......Page 96
    You’ve changed your API......Page 98
    Use optional arguments......Page 99
    Your module supports both APIs......Page 101
    Your API is still not right......Page 102
    Your module’s reputation is restored......Page 106
    Your Python Toolbox......Page 107
    3. Files and Exceptions: Dealing with Errors......Page 109
    Data is external to your program......Page 110
    It’s all lines of text......Page 111
    Take a closer look at the data......Page 113
    Know your data......Page 115
    Know your methods and ask for help......Page 116
    Know your data (better)......Page 118
    Two very different approaches......Page 119
    Add extra logic......Page 120
    Handle exceptions......Page 124
    Try first, then recover......Page 125
    Identify the code to protect......Page 127
    Take a pass on the error......Page 129
    What about other errors?......Page 132
    Add more error-checking code…......Page 133
    …Or add another level of exception handling......Page 134
    So, which approach is best?......Page 135
    You’re done…except for one small thing......Page 137
    Be specific with your exceptions......Page 138
    Your Python Toolbox......Page 139
    4. Persistence: Saving Data to Files......Page 141
    Programs produce data......Page 142
    Open your file in write mode......Page 146
    Files are left open after an exception!......Page 150
    Extend try with finally......Page 151
    Knowing the type of error is not enough......Page 153
    Use with to work with files......Page 156
    Default formats are unsuitable for files......Page 160
    Why not modify print lol()?......Page 162
    Pickle your data......Page 168
    Save with dump and restore with load......Page 169
    Generic file I/O with pickle is the way to go!......Page 173
    Your Python Toolbox......Page 174
    5. Comprehending Data: Work that Data!......Page 175
    Coach Kelly needs your help......Page 176
    Sort in one of two ways......Page 180
    The trouble with time......Page 184
    Comprehending lists......Page 191
    Iterate to remove duplicates......Page 197
    Remove duplicates with sets......Page 202
    Your Python Toolbox......Page 208
    6. Custom Data Objects: Bundling code with Data......Page 209
    Coach Kelly is back (with a new file format)......Page 210
    Use a dictionary to associate data......Page 214
    Bundle your code and its data in a class......Page 225
    Define a class......Page 226
    Use class to define classes......Page 227
    The importance of self......Page 228
    Every method’s first argument is self......Page 229
    Inherit from Python’s built-in list......Page 240
    Coach Kelly is impressed......Page 247
    Your Python Toolbox......Page 248
    7. Web Development: Putting It All Together......Page 249
    It’s good to share......Page 250
    You can put your program on the Web......Page 251
    What does your webapp need to do?......Page 254
    Design your webapp with MVC......Page 257
    Model your data......Page 258
    View your interface......Page 262
    Control your code......Page 270
    CGI lets your web server run programs......Page 271
    Display the list of athletes......Page 272
    The dreaded 404 error!......Page 278
    Create another CGI script......Page 280
    Enable CGI tracking to help with errors......Page 284
    A small change can make all the difference......Page 286
    Your webapp’s a hit!......Page 288
    Your Python Toolbox......Page 289
    8. Mobile App Development. Small Devices......Page 291
    The world is getting smaller......Page 292
    Coach Kelly is on Android......Page 293
    Don’t worry about Python 2......Page 295
    Set up your development environment......Page 296
    Configure the SDK and emulator......Page 297
    Install and configure Android Scripting......Page 298
    Add Python to your SL4A installation......Page 299
    Test Python on Android......Page 300
    Define your app’s requirements......Page 302
    The SL4A Android API......Page 310
    Select from a list on Android......Page 314
    The athlete’s data CGI script......Page 317
    The data appears to have changed type......Page 320
    JSON can’t handle your custom datatypes......Page 321
    Run your app on a real phone......Page 324
    Configure AndFTP......Page 325
    The coach is thrilled with his app......Page 326
    Your Python Toolbox......Page 327
    9. Manage Your Data: Handling Input......Page 329
    Your athlete times app has gone national......Page 330
    Use a form or dialog to accept input......Page 331
    Create an HTML form template......Page 332
    The data is delivered to your CGI script......Page 336
    Ask for input on your Android phone......Page 340
    It’s time to update your server data......Page 344
    Avoid race conditions......Page 345
    You need a better data storage mechanism......Page 346
    Use a database management system......Page 348
    Python includes SQLite......Page 349
    Exploit Python’s database API......Page 350
    The database API as Python code......Page 351
    A little database design goes a long way......Page 352
    Define your database schema......Page 353
    What does the data look like?......Page 354
    Transfer the data from your pickle to SQLite......Page 357
    What ID is assigned to which athlete?......Page 358
    Insert your timing data......Page 359
    SQLite data management tools......Page 362
    Integrate SQLite with your existing webapp......Page 363
    You still need the list of names......Page 368
    Get an athlete’s details based on ID......Page 369
    You need to amend your Android app, too......Page 378
    Update your SQLite-based athlete data......Page 384
    The NUAC is over the moon!......Page 385
    Your Python Toolbox......Page 386
    10. Scaling Your Webapp: Getting Real......Page 387
    There are whale sightings everywhere......Page 388
    The HFWWG needs to automate......Page 389
    Build your webapp with Google App Engine......Page 390
    Download and install App Engine......Page 391
    Make sure App Engine is working......Page 392
    App Engine uses the MVC pattern......Page 395
    Model your data with App Engine......Page 396
    What good is a model without a view?......Page 399
    Use templates in App Engine......Page 400
    Django’s form validation framework......Page 404
    Check your form......Page 405
    Controlling your App Engine webapp......Page 406
    Restrict input by providing options......Page 412
    Meet the “blank screen of death”......Page 414
    Process the POST within your webapp......Page 415
    Put your data in the datastore......Page 416
    Don’t break the “robustness principle”......Page 420
    Accept almost any date and time......Page 421
    It looks like you’re not quite done yet......Page 424
    Sometimes, the tiniest change can make all the difference…......Page 425
    Capture your user’s Google ID, too......Page 426
    Deploy your webapp to Google’s cloud......Page 427
    Your HFWWG webapp is deployed!......Page 430
    Your Python Toolbox......Page 431
    11. Dealing with Complexity: Data Wrangling......Page 433
    What’s a good time goal for the next race?......Page 434
    So…what’s the problem?......Page 436
    Start with the data......Page 437
    Store each time as a dictionary......Page 443
    Dissect the prediction code......Page 445
    Get input from your user......Page 449
    Getting input raises an issue…......Page 450
    If it’s not in the dictionary, it can’t be found.......Page 451
    Search for the closest match......Page 452
    The trouble is with time......Page 454
    The time-to-seconds-to-time module......Page 455
    The trouble is still with time…......Page 458
    Port to Android......Page 460
    Your Android app is a bunch of dialogs......Page 461
    Put your app together…......Page 465
    Your app’s a wrap!......Page 467
    Your Python Toolbox......Page 468
    It’s time to go…......Page 469
    Appendix: Leftovers: The Top Ten Things (we didn't cover)......Page 471
    #1: Using a “professional” IDE......Page 472
    #2: Coping with scoping......Page 473
    #3: Testing......Page 474
    #4: Advanced language features......Page 475
    #5: Regular expressions......Page 476
    #6: More on web frameworks......Page 477
    #7: Object relational mappers and NoSQL......Page 478
    #8: Programming GUIs......Page 479
    #9: Stuff to avoid......Page 480
    #10: Other books......Page 481
    Index......Page 483

    电子书下载地址回复可见:
    游客,如果您要查看本帖隐藏内容请回复

    每天进步一点点
    回复

    使用道具 举报

  • TA的每日心情
    开心
    2018-12-12 20:22
  • 签到天数: 123 天

    [LV.7]常住居民III

    1

    主题

    348

    帖子

    350

    积分

    VIP学者

    开拓者

    Rank: 5Rank: 5

    金币
    10933
    关注领域
    机械和外语
    QQ
    发表于 2017-12-21 08:35:47 | 显示全部楼层
    喜欢编程书
    后来者,奋勇争先
    回复

    使用道具 举报

  • TA的每日心情
    无聊
    2019-2-21 13:48
  • 签到天数: 3 天

    [LV.2]偶尔看看I

    0

    主题

    72

    帖子

    72

    积分

    VIP学者

    Rank: 5Rank: 5

    金币
    9683
    发表于 2019-2-19 11:18:25 | 显示全部楼层
    好书谢谢分享
    回复

    使用道具 举报

  • TA的每日心情
    开心
    2019-7-28 22:24
  • 签到天数: 8 天

    [LV.3]偶尔看看II

    0

    主题

    145

    帖子

    145

    积分

    VIP学者

    Rank: 5Rank: 5

    金币
    9420
    发表于 2019-3-27 15:33:04 | 显示全部楼层
    感谢好书分享
    回复

    使用道具 举报

  • TA的每日心情
    无聊
    2019-4-13 14:30
  • 签到天数: 38 天

    [LV.5]常住居民I

    0

    主题

    591

    帖子

    591

    积分

    VIP学者

    Rank: 5Rank: 5

    金币
    8119
    发表于 2019-6-5 21:14:09 | 显示全部楼层
    MEITIANJINBUYIDIANDIAN
    回复

    使用道具 举报

  • TA的每日心情
    奋斗
    2019-4-1 08:27
  • 签到天数: 103 天

    [LV.6]常住居民II

    14

    主题

    126

    帖子

    154

    积分

    初中生

    Rank: 2

    金币
    1239
    发表于 2019-8-13 15:26:29 | 显示全部楼层
    head first python
    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    关闭

    站长推荐上一条 /1 下一条

    QQ|Archiver|手机版|小黑屋|科研帝   

    GMT+8, 2019-12-10 07:13 , Processed in 0.564641 second(s), 28 queries .

    Powered by Discuz! X3.4

    © 2001-2017 Comsenz Inc.

    快速回复 返回顶部 返回列表