Posts

Convert UCI SMSSpamCollection Dataset to a .csv using bash script

Image
Convert UCI SMSSpamCollection Dataset to a .csv using bash script Hello Folks, how are you? Yesterday I was looking for a Spam dataset, and I found this one: SMS Spam Collection Data Set , from the UCI Machine Learning Repository. The data was in a weird text format, but I needed the .csv , so I decided to make a simple script to convert it. Here the code: The code is pretty easy. First we make sure to redirect all the output on the new .csv file (...) > SMSSpamCollection.csv . In the main body, before looping through each line, we print the header echo "sms,is_spam"; . Now we need to go through the data, using the construct while read p; do ... done < SMSSpamCollection , we are giving our dataset to the loop input ( < SMSSpamCollection ) iterating line by line ( p ). The main part consist of getting the two parts we are interested in: class [hem/spam] and the sms body. To do that, we pipe | the line p to a cut command, using the delimiter -d optio

Five Minutes, Nothing More ... [Self Promotion]

Image
I am very excited to announce the release of my first fully self-developed videogame. Five minutes . Available for free on @itchio at this link: https:// upcomingadventures.itch.io/five-minutes . A super simple puzzle game, entirely developed by me :) Five Minutes by upcomingAdventures

The simplest RESTful APIs with Python, Flask, MongoDB, and Docker

Image
Greetings, fellow programmers. This is an article on how to implement a super simple RESTful service using Flask, MongoDB and Docker. If you are reading this article it is probably because you do not want to spend much time on this, and you "probably" will not with this article. Just a few clarifications though. I will try to keep everything as simple as possible but since in programming (and not only there) it is super important to ....     Greetings, fellow programmers. This is an article on how to implement a super simple RESTful service using Flask , MongoDB and Docker . If you are reading this article it is probably because you do not want to spend much time on this, and you "probably" will not with this article. Just a few clarifications though. I will try to keep everything as simple as possible but since in programming (and not only there) it is super important to understand what one is doing (not just copy and paste, which is bad 🤬),