atlas des actus
    
JJinux : Python
26  mai     20h57
Python: Advice for Patching Your Code at Runtime
   A lot of people use mock.patch in their tests, but it ;s also sometimes useful to monkey patch code at runtime. This blog post talks about why and how. Let ;s imagine that you ;re using some library perhaps something big, like a web framework , and for whatever reason, you ;re unable...
27  avril     23h01
Security: Generating a Symmetric Key
   When I was first learning AppSec, my buddy, Josh Bonnett, sent me Cryptographic Right Answers. I read it times and still barely understood it. But, now, it’s my favorite page for figuring out the right thing to do when it comes to cryptography.Suppose you need to create a secret i.e. a symmetric...
26  novembre     19h13
Python: Streaming Sieve of Eratosthenes
   I thought of a cute way of infinitely generating prime numbers that I call the Streaming Sieve of Eratosthenes: usr bin env python Streaming Sieve of Eratosthenes I thought of a cute way of infinitely generating prime numbers. from collections import defaultdict upcoming is...
03  août     00h01
Python: My Favorite Python Tricks for LeetCode Questions
   I’ve been spending a lot of time practicing on LeetCode recently, so I thought I’d share some of my favorite intermediate level Python tricks. I’ll also cover some newer features of Python you may not have started using yet. I’ll start with basic tips and then move to more advanced ones. Get help ...
27  octobre     22h08
Python: PyWeek 32: Lil Miss Vampire
   TL;DR A world that scrolls infinitely in any direction, an RPG like UI, and simple, real time fighting. My younger kids and I built this entry for PyWeek based on the theme Neverending . The key innovations are: It has a neverending world. As the player walks along, it picks up tiles...
07  août     22h05
Type Annotations T-Shirt
   nbsp;
30  novembre     21h48
JJ’s Mostly Adequate Summary of the Django Meetup: When Not To Use the ORM & Goodbye REST: Building GraphQL APIs with Django
   The Django meetup was at Prezi. They have a great space. They are big Django users. Goodbye REST: Building APIs with Django and GraphQL Jaden Windle, jaydenwindle, lead engineer at Jetpack. https: github.com jaydenwindle goodbye rest talk They moved from Django REST Framework to GraphQL. It...
18  novembre     04h08
How to Give a Talk and Building Video Games for Fun with PyGame
   I gave two talks at BayPIGgies. Here are the slides: How to Give a Talk Building Video Games for Fun with PyGame
11  juin     21h45
Python: Custom App Labels in Django
   Django has had a long standing missing feature that made it impossible to give your apps friendly names. See and . Thankfully, this will be fixed in Django . , but switching to the latest version of Django is not an option for me right now. This was making my admin look really ugly...
16  mai     16h43
Raspberry Pi: Building an LED Digital Clock
   As I mentioned in a previous post, I really enjoyed reading Programming Raspberry Pi: Getting Started with Python. One of the chapters in the book teaches you how to build an LED digital clock. It took some futzing around, but I finally got it done : The first problem I had was that I didn’t know...
14  mai     21h11
Best Practices for Software Engineers
   As I mentioned in my last blog post, I’m going to be giving my Best Practices for Software Engineers talk at both the East Bay Ruby Meetup and at BayPIGgies the Bay Area Python Interest Group . We’re planning on broadcasting the BayPIGgies meeting using a Google Hangout on Air. If you’re...
02  mai     17h44
Best Practices for Software Engineers
   I’m going to be giving my talk Best Practices for Software Engineers at two different user groups in May: East Bay Ruby Meetup BayPIGgies Here’s the abstract: Being a software engineer requires a lot more than knowing how to write good code. This class covers a wide variety of topics...
30  avril     01h43
PyCon Notes: Introduction to SQLAlchemy
   At PyCon, Mike Bayer, the author of SQLAlchemy, gave a three hour tutorial on it. Here’s the video. What follows are my notes. He used something called sliderepl. sliderepl is a nice ASCII tool that’s a mix of slides and a REPL. You can flip through his source code slides in the terminal. It’s...
24  avril     01h41
PyCon Notes: PostgreSQL Proficiency for Python People
   In summary, this tutorial was fantastic I learned more in three hours than I would have learned if I had read a whole book Here’s the video. Here are the slides. Here are my notes: Christophe Pettus was the speaker. He’s from PostgreSQL Experts. PostgreSQL is a rich environment. It’s fully...
28  mars     16h10
Books: Two Scoops of Django: Best Practices For Django 1.6
   I just finished reading the book Two Scoops of Django: Best Practices For Django . . I had already reviewed the previous edition, so I was anxious to see what had changed. In short, I loved it It’s not an introduction, tutorial, or a reference for Django. In fact, it assumes you’ve already gone...
27  février     19h06
Python: A Response to Glyph’s Blog Post on Concurrency
   If you haven’t seen it yet, Glyph wrote a great blog post on concurrency called Unyielding. This blog post is a response to that blog post. Over the years, I’ve tried each of the approaches he talks about while working at various companies. I’ve known all of the arguments for years. However, I...
30  janvier     23h43
Python: A lightning quick introduction to virtualenv, nose, mock, monkey patching, dependency injection, and doctest
   pip pip is a tool for installing Python packages. Python . . and later include pip by default. If you don’t have pip, you’ll need to install it. virtualenv virtualenv is a tool for installing Python packages locally i.e. local to a particular project instead of globally. Here’s how to get...
10  janvier     03h43
Python: My Notes from Yesterday’s SF Python Meetup
   Here are my notes from yesterday’s SF Python Meetup: Embed Curl John Sheehan. embedcurl.com It creates a pretty version of a curl command and the output. You can embed it in your site. shlex is a module in Python to do simple lexical analysis. Click Deployment with Launch and Docker Nate...
20  septembre     18h54
Some Random Thoughts on Haskell
   It seems like all my Python friends are playing around with Haskell lately, so it’s been on my mind a lot lately. Since I’m a language guy, Haskell has always fascinated me. I wrote my first article on Haskell in Everything Your Professor Failed to Tell You About Functional Programming , and...
12  septembre     02h50
Books: Two Scoops of Django
   I just finished reading the book Two Scoops of Django. It was highly recommended to me by members of the Bay Area Python Interest Group. It covers Django best practices. In short, I loved it It’s not an introduction, tutorial, or a reference for Django. In fact, it assumes you’ve already gone...
29  août     16h00
Python: dicts vs. classes
   I like to keep it simple stupid when I’m coding Python. I use classes, but I don’t try to shove everything into classes. When all you need is a dict or a list, use a dict or a list. However, I’m coming to think that if you have a bunch of objects that look like the following: books ...
28  août     18h28
Python: One More Example of How PyCharm is Psychic
   I had the following line in my Python code: if self. lookup unallocated current allocation state, key gt; : I wanted to change it to: unallocated self. lookup unallocated current allocation state, key if unallocated gt; : Hence, I highlighted the expression, right clicked, refactor,...
23  août     19h03
Python: Using assertRaises as a Context Manager
   If you’re using the unittest library, and you want to check the value of an exception, here’s a convenient way to use assertRaises: with self.assertRaises ValueError as context manager: call some function self.assertIn Oops, something went wrong , str context manager.exception
20  août     04h18
Books: Treading on Python
   I just received my copy of Treading on Python I was the technical editor : There are two things that are great about this book. First, Matt Harrison’s a really good Python programmer, and his writing is very crisp. Secondly, the book is really short It’s weighs in at a mere pages So if you...
16  juillet     15h35
Books: Programming the Rasberry Pi: Getting Started with Python
   I just finished reading Programming Raspberry Pi: Getting Started with Python. I really liked it Actually, it was really quite amazing at how much ground Simon Monk could cover in a mere pages. The whole way through, he kept things really, really simple. My favorite example of this was when he...