Vim (Vi iMproved) is a text editor for Unix. It is free and open-source software. It is a popular text editor for system administration and development work. When you start Vim, it looks minimal but it is very powerful under the hood. Depending on your level of comfort with Linux, you may use Vim for … Read more
Are you able to automate with Bash scripts? Definitely! Is this something you want to do all the time? Of course not! It depends on the situation. What is it that you are automating? If you are a System Administrator, SRE or a frequent user of Linux, Bash scripts come in handy. There are things … Read more
Looking from the outside, Big O is very scary. Why? O is not an abbreviation for a word, it’s a concept. It’s a concept used in mathematics. It’s a concept in computer science when we want to talk about algorithms. What is algorithms? Yeah, that is another scary concept on its own but we’re here … Read more
Suppose you have a piggy bank containing a lot of coins and you want to count them. You store your coins in a dictionary. Once you finish adding them in the dictionary, you want to know how much you have of each denomination. How do you do it? To see this example in real life … Read more
There are many ways to get the current time in Python. Good thing Python has provided us with a module we can just import and use right away. Do consider how you plan to display the current time. Does it include the date with the time or is it just the time? If it includes … Read more
Suppose you are writing a Python program and you want to check if a list is empty. How would you do it? This should be something that is very straightforward right? Or is it? The example could be a list of fruits that you are keeping track of. The list can be something like the … Read more
There are a number of reasons why you may want to generate a random number in a Bash shell. We are referring to a Bash shell rather than using a programming language such as C++, Java or Python. Maybe you want to pull a random line from a file. Maybe you want to generate a … Read more
Adding a date or time to your program is really easy with Python. All you have to do is import date or import time and then use the available method calls.
Most likely though, you are here because you need something more than that. You probably need to convert epoch seconds to a date format. You may want to know how to get the difference between two dates.