Tags » Python

What does the “yield” keyword do?

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

Iterables

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

[Leetcode] Convert a Number to Hexadecimal

Description:

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

Example:

Example 1:

Input:
26

Output:
"1a"
… 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

WhizzML

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

Debugging

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

Mac

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

News

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

Python