Introduction Imagine you want to get chemical properties of Oxygen. There should be an article about Oxygen on Wikipedia. How about Microsoft corporation ? Who is the CEO ? Where is the headquarter located ? Again, Microsoft is so popular so there must be an article about it on Wikipedia. The good news is that
Introduction I wanted to connect to an MS SQL server database using Python from my Mac laptop. I struggled a bit but eventually I had a working solution. I thought it can be useful so I am sharing it… Steps Make sure you have brew installed on mac. If not, you can get it from
JSON in few words JSON (i.e. JavaScript Object Notation) syntax is based on a subset of the JavaScript programming language. It is a simple, easy to read, write, parse and transform data exchange format. JSON is extremely popular in building REST based web services. Recall that not only JSON but also other formats such as
Table of contents Introduction Playing cards Playing cards four of a kind Playing cards one ace in each hand Probability of selecting marbles Probability of selecting two balls of the same color Forming a team Color signals California license plate numbers Computer language symbols Men and women Cars and drivers Defective antennas Car parking Random
Table of contents Recursive exponential Recursive max Recursive multiplication Recursive sum Recursive average Recursive uppercase Recursive exponential Given two exponential numbers with the same base, the multiplication is another exponential number with the same base but we add the exponents. We can utilize this observation and define a recursive exponential formula. If (n) is even
Introduction Have you heard of Yelp before ? Probably yes, it is a crowd sourced review local search service. Today, we are going to demonstrate Yelp’s open API using Python. We are going to implement a simple Python script to search for a business, get its rating, address and phone number. Our script utilizes Yelp
Table of contents Circular linked list Linked list nth node from the end Reverse linked list Reverse linked list recursively Circular linked list This is a typical interview question. Given a singly linked list. Write a function that detects if the linked list is circular (has a loop) which means the last node points to
Introduction Buying and selling domain names is fun and can be rewarding at the same time, specially if we manage to generate a unique domain name that could sell for a fortune. Getting rich overnight is not our topic today, however we are going to discuss how can we automate checking domain name availability using
Introduction There are various ways to implement a minimal Python web service or server. It can be easily implemented using the web.py python web framework. First, you need to install the library. Open a terminal and execute the following command… Provide the password when requested. If the installation goes smoothly, create a Python script and
Introduction So you got a text file with duplicates (words, lines, etc) and you want to delete the extra ones ? How can we do that ? This post discusses a couple of methods that can be used to remove duplicates via Unix (or Mac) terminal. Assume we have the following text file… Let us