codemakesmehappy.com
Code Makes Me Happy: Solving UnicodeDecodeErrors Due to Opening Binary Files
http://www.codemakesmehappy.com/2015/11/solving-unicodedecodeerrors-due-to.html
Code Makes Me Happy. Python, JS, CSS, HTML5, open source, hacking, fun. Monday, November 9, 2015. Solving UnicodeDecodeErrors Due to Opening Binary Files. Common Scenario: Walking Directory Tree and Opening Files. A common thing to do in Python is to go through a directory tree, opening each file and doing something with the file's text. Do something with each line of the file here. Go ahead, right inside the for loop. It's a text file, so imagine the possibilities. Those errors are scary! X00 x00 x01 x00.
codemakesmehappy.com
Code Makes Me Happy: March 2015
http://www.codemakesmehappy.com/2015_03_01_archive.html
Code Makes Me Happy. Python, JS, CSS, HTML5, open source, hacking, fun. Tuesday, March 24, 2015. Lately, I've been playing around with drawing flowers with Python and Pillow. The trick to drawing flowers is to iterate around the petals in polar coordinates, and then convert polar to cartesian for drawing purposes. Posted by A. Roy Greenfeld. Friday, March 6, 2015. Compressing PDF Files at the Command Line. You might remember Ghostscript from your college days. Ps2pdf -dPDFSETTINGS=/ebook in.pdf out&#...
codemakesmehappy.com
Code Makes Me Happy: December 2014
http://www.codemakesmehappy.com/2014_12_01_archive.html
Code Makes Me Happy. Python, JS, CSS, HTML5, open source, hacking, fun. Sunday, December 14, 2014. Customizing the Bash Prompt to Be More Romantic. I used to have a long, detailed Bash prompt like this:. To get this, I had this line in my .bashrc file:. Bash prompt displays the hostname, current directory name, username. H: W u $". But I eventually grew tired of seeing all that useful information, as it made my prompt too long. It was time for a change. So I changed it to this:. More romantic bash prompt.
codemakesmehappy.com
Code Makes Me Happy: May 2015
http://www.codemakesmehappy.com/2015_05_01_archive.html
Code Makes Me Happy. Python, JS, CSS, HTML5, open source, hacking, fun. Tuesday, May 26, 2015. Our Trip to DjangoGirls Ensenada, Mexico. This weekend, Daniel and I drove down to Ensenada, Mexico to speak and coach at DjangoGirls Ensenada. It was a 2-day workshop for women of any level of experience to get a taste of web application development. Thank you to the @DjangoGirlsMX organizer team! A photo posted by Audrey Roy Greenfeld (@pyaudrey) on. May 23, 2015 at 10:09pm PDT. And the non-profit Hala Ken.
codemakesmehappy.com
Code Makes Me Happy: Lazy Evaluation and SQL Queries in the Django Shell
http://www.codemakesmehappy.com/2016/04/lazy-evaluation-and-sql-queries-in.html
Code Makes Me Happy. Python, JS, CSS, HTML5, open source, hacking, fun. Thursday, April 28, 2016. Lazy Evaluation and SQL Queries in the Django Shell. In Django terms, a QuerySet is an iterable of database records. What's nice about them is that they are evaluated only when you're ready for the results. Evaluating a QuerySet Repeatedly. Imagine that we work for Häagen-Dazs and have access to their Django shell. We can use this to our advantage by hunting for free ice cream promotions. As a side note, the...
codemakesmehappy.com
Code Makes Me Happy: Two Scoops of Django 1.8 is out!
http://www.codemakesmehappy.com/2015/05/two-scoops-of-django-18-is-out.html
Code Makes Me Happy. Python, JS, CSS, HTML5, open source, hacking, fun. Sunday, May 3, 2015. Two Scoops of Django 1.8 is out! Daniel Roy Greenfeld and I have updated Two Scoops of Django to 1.8, since Django 1.8 is a Long Term Support version. The book is now available as a PDF. I know this will make a lot of folks happy! The print paperback is coming soon (US and India editions to start). More info: http:/ twoscoopspress.org/products/two-scoops-of-django-1-8. Enjoy, and hope it's helpful! And I like to.
codemakesmehappy.com
Code Makes Me Happy: Intensive Django Training With the 91st Cyberspace Operations Squadron
http://www.codemakesmehappy.com/2015/11/intensive-django-training-with-91st.html
Code Makes Me Happy. Python, JS, CSS, HTML5, open source, hacking, fun. Tuesday, November 3, 2015. Intensive Django Training With the 91st Cyberspace Operations Squadron. Daniel and I just returned from a trip to San Antonio, Texas, where we taught one of our intensive Django training workshops at Lackland Air Force Base. We prepared a customized version of our curriculum to meet the needs of the 91st Cyberspace Operations Squadron. Of the US Air Force. Special thanks to Capt. Jonathan D. Miller.
codemakesmehappy.com
Code Makes Me Happy: November 2015
http://www.codemakesmehappy.com/2015_11_01_archive.html
Code Makes Me Happy. Python, JS, CSS, HTML5, open source, hacking, fun. Monday, November 9, 2015. Solving UnicodeDecodeErrors Due to Opening Binary Files. Common Scenario: Walking Directory Tree and Opening Files. A common thing to do in Python is to go through a directory tree, opening each file and doing something with the file's text. Do something with each line of the file here. Go ahead, right inside the for loop. It's a text file, so imagine the possibilities. Those errors are scary! X00 x00 x01 x00.
codemakesmehappy.com
Code Makes Me Happy: April 2015
http://www.codemakesmehappy.com/2015_04_01_archive.html
Code Makes Me Happy. Python, JS, CSS, HTML5, open source, hacking, fun. Sunday, April 12, 2015. Spring Cleaning for Python Programmers. It's spring again, which means that for Python programmers, it's time to clean out your hard drive. 1 Add these lines to your .bashrc (or other shell rc) file:. Find -type f -name "*.pyc" -print -delete'. The first part gives you a handy rmpyc command to recursively delete .pyc files. The second part tells Python not to write .pyc files anymore. Note: originally the inst...
codemakesmehappy.com
Code Makes Me Happy: April 2016
http://www.codemakesmehappy.com/2016_04_01_archive.html
Code Makes Me Happy. Python, JS, CSS, HTML5, open source, hacking, fun. Thursday, April 28, 2016. Lazy Evaluation and SQL Queries in the Django Shell. In Django terms, a QuerySet is an iterable of database records. What's nice about them is that they are evaluated only when you're ready for the results. Evaluating a QuerySet Repeatedly. Imagine that we work for Häagen-Dazs and have access to their Django shell. We can use this to our advantage by hunting for free ice cream promotions. As a side note, the...