• Here are all articles tagged Python
  • Programmatically Identifying Political Media

    Posted on November 2nd, 2020 | Tags: Python, Machine Learning

    With the US election coming up, the amount of political media in my face has reached an all time high. In fact this is a common complaint I hear among people I talk to, even those not in the US. So I thought to myself what if there was a way to identify political media before I ever got to the content...Keep that thought in mind as you read through this post and think how you or someone else could use this technology. …

    read more

  • Introduction To Unit Testing In Python & Ruby

    Posted on May 25th, 2013 | Tags: Python, Ruby

    One of the things I noticed that isn't really taught much is creating test suites for your programs. A lot of times you'll just have sample input and output to test your programs. This works great for one off applications but doesn't really carry over to on-going application development life cycle, especially when new developers are constantly being added to a project.

    You don't need any crazy library to do testing. In fact Python and Ruby come with their own testing libraries. I …

    read more

  • Fighting Comment Spam With Project Honey Pot

    Posted on May 11th, 2013 | Tags: Tools, Django, Python

    Early on when developing this blog my goal was to allow for a commenting system that didn't require login of my site or any other third party site to post. This has made me a huge target for spammers. In fact when my site first launched I didn't use recaptcha so I was getting thousands of comments per day and I didn't really have all that much content. However, a majority of these posts never saw the light of day thanks to Project …

    read more

  • Rotating a Matrix

    Posted on April 20th, 2013 | Tags: Challenges, Python

    From time to time when I'm bored I'll go through seemingly simple programming/interview challenges. One that I found interesting was the following:

    Rotate an NxN matrix 90 degrees in the clockwise direction.

    Sometimes the question also has a "bonus" challenge of rotating the matrix in memory. So basically without creating a new array or matrix. I'm not really a fan of this addition since it takes the naive approach off the board. Granted the naive approach is really dirty compared to what it …

    read more

  • Creating an API With Django

    Posted on March 2nd, 2013 | Tags: Python, Django

    It's been a crazy week for me put I wanted to make sure I got some useful content out. This week I'll be jumping back to python/django and talking about decorators and how they can be used for creating an API.

    A lot of people recommend Tastypie but I like to keep things simple when possible. Most APIs don't need anything as complex as Tastypie and just need something that can restrict access to some functions. Decorators make this really simple to do …

    read more

<< Older Posts