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.