When working with data science projects or any other as well, we might need to work with long binary strings. Bitarray is the package that is need of the hour. However we might also need an array of bit strings. In that case, one option is to store every bit string in a dictionary data… Continue reading Handling Array of Long Bit Strings – Python
This is a python code for a random poem generator. The code has a lot of scope for improvements. This project was implemented to learn python and python gui using tkinter. It takes a keyword as a input and generates a random 4 line poem as output. It uses python 3.4, tkinter and BeautifulSoup API’s.… Continue reading Random Poem Generator
Applications would need a progress bar while the task is in progress. Python has a simple way of doing it using tkinter. Here are the specs this code adheres to: Python version – 3.4 Front end using – tkinter Here is how the output looks like:
While dealing with color operations we would need to work with RGB and Hex values and need conversation between formats for the operations. Here are the python code snippets to achieve the same. 1. Converting RGB to HEX 2. Converting HEX to RGB
The code is appropriately commented to understand the necessitates.
Adjacent colors are obtained by rotating 30 and 360 degrees of any given color from the color wheel. Below is the Python code to achieve the same. The input supplied is Hex value of color and output is the list of two adjacent colors (Hex value).
Colors that are opposite to each other on the color wheel are called complementary colors. You can look out on web for more information. The function below takes a color as a input (hex-value) and returns its complementary color (hex-value).