Tags » Python

What does the “yield” keyword do?

To understand what yield does, you must understand what generators are. And before generators come iterables.


When you create a list, you can read its items one by one. 453 more words

[Leetcode] Convert a Number to Hexadecimal


Given an integer, write an algorithm to convert it to hexadecimal. For negative integer, two’s complement method is used.


Example 1:


… 188 more words
Interview Algorithms

Logistic Regression versus Decision Trees

The question of which model type to apply to a Machine Learning task can be a daunting one given the immense number of algorithms available in the literature. 590 more words


Scaling the Cliffs of Insanity (aka using Ansible from a Windows controller)

This post is just record-keeping for me to remember why I abandoned Ansible on Windows a few months back.

Here’s what I did to enable me to use Ansible for automation… 1,773 more words


Installing Python3 Qt5 on MacOS Sierra

Python 3 is one of my favorite programming languages and Qt is a pretty awesome toolkit.  Unfortunately, getting the two to work together on a Mac isn’t all that obvious.  694 more words


Python bites man while taking selfie

Forest department officials in India have promised strict action after a python attacked a man, when a group was trying to click a photo with the snake. 210 more words


File R/W in Python

In Python reading from and writing in file is pretty much straight forward.

The below class demonstrates how you can read content from a file and how to write content in a file. 169 more words