Search This Blog

Monday, July 7, 2025

Python Interview Prep - Part 1

The post holds my old notes and questions that have been asked during the era of python2.7. This is my interview prep guide.

Table of Contents

  1. What is python?

  2. What is the purpose of PYTHONSTARTUP environment variable?

  3. Is python a case sensitive language?

  4. What are 5 standard data types in python?

  5. What is PEP8?

  6. What is pickling and unpickling?

  7. How memory is managed in Python?

  8. What are the tools that help to find bugs or perform static analysis?

  9. How will you convert a string to an int in python?

  10. How will you convert a string to a float in python?

  11. How will you convert a object to a regular string representation in python?

  12. How will you convert a String to an object in python?

  13. How will you convert a string to a tuple in python?

  14. How will you convert a string to a list in python?

  15. How will you convert a string to a set in python?

  16. How will you create a dictionary using tuples in python?

  17. How will you convert a string to a frozen set in python?

  18. How will you convert an integer to a character in python?

  19. How will you convert an integer to an unicode character in python?

  20. How to convert ASCII to int and back?

  21. How will you convert an integer to hexadecimal string in python?

  22. How will you convert an integer to octal string in python?

  23. What is the purpose of ** operator?

  24. What is the purpose of // operator?

  25. Difference between is and == in python?

  26. Python Format Specifiers(python 2):

  27. Pick a random item from a list or tuple?

  28. Pick a random item from a range?

  29. How can you get a random number in python?

  30. How will you set the starting value in generating random numbers?

  31. How will you capitalizes first letter of string?

  32. How will you check in a string that all characters are alphanumeric?

  33. How will you check in a string that all characters are digits?

  34. How will you check in a string that all characters are in lowercase?

  35. How will you check in a string that all characters are in uppercase?

  36. How will you check in a string that all characters are numerics?

  37. How will you check in a string that all characters are whitespaces?

  38. How will you check in a string that it is properly titlecased?

  39. How will you replaces all occurrences of old substring in string with new string?

  40. How will you change case for all letters in string?

  41. How will you check in a string that all characters are decimal?

  42. What is the output of ['Hi!'] * 4?

  43. How will you get the max valued item of a list?

  44. How will you get the min valued item of a list?

  45. How will you get the index of an object in a list?

  46. How will you insert an object at given index in a list?

  47. How will you remove last object from a list?

  48. How your python code gets executed?

  49. Is .pyc created every time code is run?

  50. Different python complied extensions

Tuesday, May 20, 2025

Learning Docker via Practical Apps - Containerize MySQL and Phpmyadmin



For developers working with databases, the combination of MySQL, a robust open-source relational database, and phpMyAdmin, a user-friendly web-based database administration tool, is a staple. This powerful duo becomes even more potent when containerized with Docker.

This comprehensive guide will walk you through the process of setting up and running both MySQL and phpMyAdmin within separate yet linked Docker containers. We'll explore the benefits of this approach, provide step-by-step instructions, and equip you with the knowledge to streamline your database management workflow.

By encapsulating applications and their dependencies into portable containers, Docker ensures consistency across different environments.

The following are the two references for this.

  1. MySQL Docker Container - https://hub.docker.com/_/mysql
  2. phpmyadmin Docker Container - https://hub.docker.com/_/phpmyadmin

Saturday, April 26, 2025

A Deep Dive into a C-Based Encryption Tool



In today's digital age, where data breaches and privacy concerns are rampant, understanding the fundamentals of encryption is more crucial than ever. This post delves into a powerful, albeit simplified, C-based encryption tool. We'll explore its inner workings, dissect the code, and understand the cryptographic principles that make it tick. Whether you're a seasoned developer or a curious tech enthusiast, this guide will provide valuable insights into the world of secure communication.

Friday, April 25, 2025

How to Build a Biometric Authentication System in Python Using the Windows Biometric Framework


Biometric authentication is no longer limited to high-security labs or science fiction movies. With the rise of facial recognition and fingerprint scanning, developers now have the tools to implement biometric login systems in their own applications. In this tutorial, we’ll show you how to build a Python-based biometric authentication system using the Windows Biometric Framework (WBF).

Whether you’re building a secure desktop app, experimenting with IoT access control, or just curious about how biometric login works, this post walks you through every step—from loading the biometric API to identifying users by fingerprint or facial data.

Tuesday, May 3, 2022

Write a python program to search for a file in a provided directory

 So i had to for some reason develop a small utility to search a directory or drive for a particular filename. Decided to do the same in python to try and explore the os.walk() in python.

Here is how i did the same.

Sunday, March 28, 2021

Embedded System Podcast - Episode 11 - Version Control

 


The Version Control Basics 

 In the come back episode i try to remember the settings for the microphone :D. Try to give a brief introduction about the subversion version control. I also introduce my open source project WebSVN, a free repository viewer for subversion. Hosted on github where one can raise its issues and request features for the same. Thanks and Regards

Sunday, March 14, 2021

Writing Pre-Commit Hook Scripts in Python for Subversion

It is pretty simple to write hook scripts for subversion in python even without using the subversion library. 

Here in this post i show how i wrote a pre-commit hook script to tackle three of the requirements.

  1. Length of the commit message should not be less than 50 characters
  2. The log message should have the work item id written so the commit can be linked to the work items in the Rational Change and Configuration Management Tool
  3. As the repository will only contain python scripts so nothing else should be committed into it.
  4. The changes should be recorded in the work item id mentioned.

Monday, August 24, 2020

Embedded System Podcast - Episode - 10 Commit Log Policing

One or the other time there is always something, some first thing that you do in your career. That you have seen all the time but never have done yourself before. 

That is what i am going to talk about today. It is called commit Log policing.

You are going to do this daily if you are the repository admin or responsible for entire code. But there will always be the very first time you are going to write something that does the policing for the entire team. This is my story of me first time writing the policing rules. 



Related Post