With OPENAI’s ChatGPT being open to the public, it is now easy and possible to harness the incredible power of LLM like ChatGPT using any language of your choice. The good folks at OpenAI has good API documentations and handout free API keys to anyone who is interested. The free account allows you to use […]
Tag: python
Finding a missing number in a sequence
Imagine having a list of thousands of numbers in a sequence that is supposed to be sequential (incrementing by one) and somewhere there’s a number missing. That number could be an ID or some required piece of information. Also, what if the sequence is not incrementing by one but by some other number (e.g. by […]
Splitting a continuous blob of text
There are times we copy a bunch of text from a web page or a trascript online where formatting is not copied and therefore everything copied comes in the clipboard as a large continuous text blob without line breaks. We often need to split a continous series of sentences into their individual lines for better […]
Creating iCalender files (Events)
In my previous blog, I shared how to read an existing event file in iCalendar format (commonly with ICS extension). Be sure to read that before continuing. Here, I’ll show you how to create one from scratch. Let’s support we want an event that is:starting on feb 09, 2023 at 1pm and ending at 2pm […]
Working with iCalendar Events
In this post, I’ll touch on how appointments, events are commonly shared in the digital world and how to create, manipulate, and open such objects using simple code. But first, and introduction to iCalendar. iCalendar is a file format used for exchanging calendar and scheduling information between computers. It’s the most universal and portable format […]
Decision Tree and Prediction (Python)
This is an example of a Decision Tree model (very useful and popular method) to make prediction using the power of Machine Learning…using just a normal PC. Here we predict salary (depedendent variable) by giving various types of criteria (different forks in a decision tree). e.g. What’s the salary of a particular gender, of some […]
Derivatives? Why?! Can I code it?
Derivatives are used to find the rate of changes of a quantity with respect to another quantity. The derivative of a variable tells us the rate of change of a function’s output value as it varies from the initial value…how much is it changing? For a straight line (e.g. linear regression), we can calculate the […]
Wanna be a weather reporter? Me neither! So let’s do Machine Learning (AI)! Part 2/2
This is a continuation of weather prediction via ML and is the final part (2/2) where I demonstrate how to write Python code to leverage a neural network algorithm called Neural Prophet, a quite straight-forward and useful model. Be sure to read the first part that focuses on understanding the data in Excel and some […]
Wanna be a weather reporter? Me neither! So let’s do Machine Learning (AI)! Part 1/2
Reporting weather by reading off the predictions is obviously a very different skill than creating the code and models that actually predicts the weather! Not just forecasting for the next 5 days, but actually PREDICTING for any number of period in the future! Is that even possible? Yes, it is albeit there are myriad of […]
Logistic Regression Example (Excel, Python)
In my previous blog on Sigmoid function, I touched on its usefulness and how it’s used to solve Logistic Regression problems either in binary or multiclass classification scenarios. Be sure to check that out https://flyingsalmon.net/?p=3879 first! In this blog, we’ll be using a dataset containing people’s ages and whether or not they bought life insurance […]