In this post, I show different ways to generate a list and array containing numbers (ints, and floats, positive and negative, mixed) in python…using random, list, and numpy arrays. Why do we need both? NumPy arrays are very efficient for numerical operations and require elements to be of the same data type, whereas lists are […]
Tag: coding
Finding min, max in a sequence and plotting the distances
Let’s say that we have a sequence of numbers in consisting of whole numbers, fractions, positive and negative numbers of varying length, that is, of no predefined length (e.g.2.25, 5.25, 6.75, 8.25, 9.75…). What we want to do is to sort the numbers in ascending order, and find the differences between 2 adjacent numbers and […]
Calculate your tank size capacity in gallons (and weight)
Don’t remember how many gallons your tank or pond holds? No worries, this little code below will calculate the amount of gallons the container can hold based on its dimensions you enter. Besides, knowing your actual water volume helps you determine what 10%, 30% water change means in gallons, and precise measurements of additives (conditioner, […]
Estimating the final pH, GH, KH of your water mixture
As a fish and shrimp keeper on different tanks with different creatures requiring different water parameters and conditions, it does me good to keep track of all those especially when replacing or changing water, or adjusting parameters for optimal suitability of the creatures. For example, for the shrimp tank, keeping track of KH, GH are […]
Projecting Neocaridina Shrimp Population
Two months ago I wrote an app for myself to keep track of my new hobby Neocaridina Shrimpkeeping. It was only 2 weeks before that I started the hobby before I recognized that a handy application to keep track of my shrimp’s water parameters, treatments and care with curated, accurate information would be very useful. […]
The amazing UNDO
Sure, computers are powerful tools that allow us to create, edit, and share various types of content. However, it can also be a source of frustrations and even horror especially when we lose our work or made a mistake that ruins the creation. We may make mistakes or change our minds about what we want […]
Calculating Euclidean Distance in Python
Euclidean distance is the length of the line segment between two points in Euclidean space. It can be calculated from the Cartesian coordinates of the points using the Pythagorean theorem. It is a simple formula enough to be calculated by hand but powerful enough to be used in Machine Learning and Artificial Intelligence applications for […]
New Arrival: Shrimp Care App!
I recently picked up a new hobby: Shrimp keeping! Having 40+ years of experience with keeping tropical fish, I thought this would be an interesting addition and to put my extra 29 gallon tank to good use. To get started, of course, I researched online about types of shrimps and their requirements. Then I joined […]
UPDATED: Find out more about your birthday
Sometime ago, I shared my code on how to determined the day of the week of someone’s birthday based on the DOB. You can check the original post here: https://flyingsalmon.net/which-day-were-you-born/Today, however, I am extending it a little further and also showing additional information about the birthday. For example:The key news/historical events of that day!What generation […]
Word Connect Game
Recently, the game on New York Times has been getting a lot of attention and generating much excitement by the readers. While I don’t subscribe to the newspaper, my friends shared the game screens with me which prompted me to ponder if I could create my version of this in Python. So, after a few […]