Hacker News new | past | comments | ask | show | jobs | submit login
Legally Free Python Books List (pythonkitchen.com)
173 points by osdotsystem 6 months ago | hide | past | favorite | 41 comments



Here's some more:

* https://dabeaz-course.github.io/practical-python/Notes/Conte... by David Beazley --> covers foundational aspects of Python programming with an emphasis on script writing, data manipulation, and program organization

* https://python-patterns.guide/ by Brandon Rhodes --> inspired from Gang of Four book

* https://github.com/satwikkansal/wtfpython (this is more of a collection) --> Exploring and understanding Python through surprising snippets

Also, my ebook Python re(gex)? covering re and regex modules is free to read online: https://learnbyexample.github.io/py_regular_expressions/ (pdf/epub is paid, available via leanpub/gumroad)


Added 1 2 4 and ommitted 3 as not a book. I forgot DBeazley's, BRhodes ... and discovered yours!


oh yes . David Beazley's video course on OReilly is great. I love .


# Marked to add


I'd add this one to the list, filed under "Software Engineering": https://www.cosmicpython.com/

It's published in dead tree form by O'Reilly, but the authors also made it available online and gave it a CC-By-NC-ND license.

Full disclosure: I haven't read this deeply, but I've skimmed it, and it looks interesting enough that I want to read it deeply.


# Marked to add


Added!


I think it's true, as the blog author notes, that although is a great deal of intro python material, there is a lack of discussion of what useful stuff can be done with intermediate python skills. I've tried studying python three times now. Each time I get a little further, but also each time after a while I start to go "but what the heck can I do with this in my own life that is actually useful?" Probably it's a failure of my own imagination and/or simply a function of the fact that I work as a lawyer and so don't have any obvious examples in my head of how I'm going to use the code, but if I can't see even a potential application down the line I find it difficult to slog through the tedious work. I had originally got going in this area because I had a data-mining idea in mind, but that fell by the wayside.


Since you are a lawyer: http://codingforlawyers.com/

For example, chapter 1 discusses regex for searching (and potentially replacing) patterns in texts.


Interesting, thank you.


I think your comment on intermediate skills is an important one. Personally it seems like there is often a dearth of intermediate resources to better understand and utilize the language. Maybe it's more complex use cases, patterns and best practices, advanced syntax (looking at you, Haskell), etc.

For Python I think you're lucky in how versatile and ubiquitous it is. I've found the best way for applying Python is "I want to learn x" and oftentimes 'x' is suitable or desired with Python.

In your case I can see search (as mentioned by someone else) as being useful. Also being able to make API requests for cases/documents that you may want to search or maybe save to a local db for later indexing. Speaking of indexing, maybe you may start looking into a bit of NLP.

My biggest piece of advice would be that if you really want to use Python, use it in a situation where it makes sense but could be accomplished a different way. Maybe that document request form that you were going to fill out via the UI can be done via an API endpoint you can write in Python. Instead of searching via 'Ctrl-F' write a small script that you pass document(s) to search and term(s) to search for.


You have to get going with a project that gets you excited. Automate the boring stuff is one such book!


Automate the Boring Stuff is one of the sources I have used. I think perhaps I just need to be patient and keep at it and trust that I will find an application for the techniques.


Python has many many ways to be useful, it might just be a script. I have seen people with far less py skills than me use Python for a small Gui app or a simple script and they are very happy as it helped them. Try teaching what you know, it can make a big difference to someone and ... you will get new insights. You tried OpenSource?


Programmer turned law student here.

Some potential areas of exploration you can think about:

- Natural Language Processing (nltk and SpaCy) - there are a lot of people trying to build tools to parse contracts, judgments, legislation and much else besides. You got a big pile of documents and you want to find every single mention of a company name in a stack of thousands of documents: time for named entity recognition. Similarly, in policing and in private sector fraud detection, natural language processing is being used to parse through the hundreds of pages of emails/texts collected from the average person's phone or laptop.

- automate work around office files - openpyxl lets you open Excel files, python-docx for Word files

- Simple web applications with Django. Django was built initially for making small projects to support journalists to enter data using an admin panel, then display it on a website. If you need a simple data collection tool, a small Django app may just do the job.

- If you're doing contract review or transactional work, DocuSign has an API. Automating workflows around that could allow you to be more efficient.

- I've ended up writing code to automate some of my email handling. Accessing your email using imaplib means you can write scripts that'll process email in ways that go beyond the simple email filters in Gmail/Outlook.

- If you're dealing with governments or regulators in pretty much any capacity, you'll probably end up wanting to do screen scraping eventually to automate the processing of data published on the web. Requests, BeautifulSoup and Scrapy are your friends for this.

- Notifications: if something is running in the background and takes more than a few minutes, I don't want to waste my time sitting and waiting for it or remembering to check it. On Mac, Linux and Windows there are tools to let you send yourself notifications... or you can use APIs to send yourself notifications via messaging apps like Telegram/Facebook Messenger, or (for a cent or two per pop) by SMS. There's APIs like Pushbullet and Pushover to plumb together mobile notifications for iOS/Android too.

- Time tracking: if I find myself having to account for my activities in, uh, small billable chunks at some point in the near future, you can bet I'm doing what I can to automate the hell out of that.

Before "life hack" meant "a silly thing you learned on BuzzFeed that you'll never actually do", it was used to refer to the often rather hacky set of tools and scripts used by software developers to be productive, and to glue together and make sense of their information dense lives. There are non-tech professionals who are using coding skills to automate their professional practice - like accountants building their own homemade document processing systems by cobbling together Dropbox/Google Drive/etc. with little scripts and cron jobs (etc.), and if you can get good at that, you've basically got a superpower that many of your colleagues won't have, and you've also got domain knowledge software developers don't have.


"Programmer turned law student here", late i realised it was not a lawyer turned programmer.


I'm a lawyer turned programmer. Generally agree with the above but would add:

   - NLP applications, many practitioners and judges may not trust the software especially if implemented by a hobbyist and prefer many paralegals review manually.  I'd pursue this more out of interest or to solve a personal workflow issue but be wary of generalising unless it becomes your main focus.
   - Integrations with word/excel can definitely be useful. I wrote a bunch of simple VBA add-ons in Excel to help with mundane parts of managing a large e-discovery. But I found it a real slog to learn the word/excel specific stuff, so wouldn't recommend it as a first hobbyist project.
   - Learning how to ingest various docs and do regex saved me the most time. If you do a lot of e-discovery and your firm's platform of choice supports regex just learning that grammar is probably the best bang for buck.  Downloading and searching a smaller number if files locally can also be good. Was always disappointed when the files I wanted were in a "secure" dealroom so I couldn't legitimately download or scrape them.


On NLP, in the UK there has been one miscarriage of justice (a wrongfully convicted man spent four years in prison) due to mishandling of text messages by police and prosecutors, and some close misses. Because of the time pressures on police and prosecutors, they were just looking for a bunch of keywords unsystematically rather than reading the material fully, and failing to disclose relevant material to defence lawyers.

See: https://www.independent.co.uk/news/uk/crime/rape-conviction-...

Getting text automation software wrong can have pretty horrible consequences. AI/ML tools should be an aid to proper review of documents, not a replacement for it.


Thanks for your input!


What does it mean "legally free"? What are those scary-sounding "illegally free" books? This term is not defined and it does not make any sense to me. The word "free" is already overloaded with two meanings (as in speech, as in beer), and now these people introduce confusingly the concept of "legally free".


Most recent books are "illegally free" through standard piracy channels, so this effort to find out good books that can be downloaded without restrictions makes a lot of sense. It's a great community initiative.


Free - you don't have to pay money. Legally - to emphasize it is not pirated books, to differentiate with many articles claiming to show free books when they in reality show links to pirated materials


On the topic of good Python books, I really recommend "Fluent Python".

It is not free, however.


Dive Into Python 3 (by Mark Pilgrim) - https://diveintopython3.net/


Absolutely my favorite Python resource, highly recommended.


For anyone learning Python, experienced or not, Python For Beginners at python.org points to tutorials and docs appropriate for either profile. These are, of course, not-a-books.

https://www.python.org/about/gettingstarted/


For what it's worth: Al Sweigart's "Automate the Boring Stuff with Python" is pretty nice, and it's a good one for lending out to colleagues who show interest in learning Python (especially those poor souls with tedious jobs...).


If someone has more free PyGame books or any less-known books, please post the linK!



Not free!


Updated 2021? :-p


It's from the UTC+384h time zone.


I guess the author time travels?


Updated it so that people get it ready for 2021


https://www.pygame.org/wiki/resources has a comprehensive collection of resources, but I think only inventwithpython is a book, which is already mentioned in the list


Lutz's (not free) "Learning Python" was my first computer science book, and it holds up on repeated reads.


Would be nice if it was segregated into beginner, intermediate and expert levels


Software engineering might be considered as expert, well anything beyond intro falls in intermediate/expert but nice point to single them out!


Off-topic: Does the same thing exist for shell programming?


Not quite as impressive a list as OP, but I have a curated list of Linux related resources collected here [0], most of which are free. Shell related resources are mostly 'bash'

[0] https://github.com/learnbyexample/scripting_course/blob/mast...


YouTube is a great resource but it’s not a book.

Personally I like a combination of a book and YouTube tutorial. For shell/Linux stuff I like to go to YouTube first, learn a little bit, and then go to the docs.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: