-
Loading data to a Mongo database for further processing
Hi, Since I needed my data to be available for further processing in a centralized manner, I have decided to store the first draft as well as further queries to location API in a Mongo database. Here is the short code snippet that was used for this task: From the concatenated file, my interest is…
-
Start of the traffic project
So, I managed to gather about 1 GB of records from the pfsense installation and grab them from the box (filter.log files that you can find under /var/log). And I have a list of 16 logs that I need to concatenate. I had a lot of trouble concatenating it since I tried multiple times to…
-
Python Kata on Codewars
Hi, Since I pretty much broke the internet trying to solve the following “kata” with pieces of code, lets paste it also here cause it makes me proud. Here is the link to the kata: https://www.codewars.com/kata/5977ef1f945d45158d00011f And also here is my “solution” which took quite a long time to fix: That is all. Cheers!
-
Unique value on columns – pandas
Hi, Today is a short example on cases that have longer columns with spaces. For example. I have a dataframe that has the following columns: I have read in some sources that you can use the construction wine_new.[column name].unique() to filter the values. If you have a one word column, it will work, but if…
-
Prometheus metrics to Pandas data frame
Hi, We are trying to implement a decision tree algorithm in order to see if our resource usage can classify our servers in different categories. First step in that process is querying Prometheus from Python and create some data frames with some basic information in order to get them aggregated. To that purpose, you can…
-
Optimizing VM costs in GCP
Hi, I recently published on Medium the hole story related to https://log-it.tech/2019/11/26/using-gcp-recommender-api-for-compute-engine/ You can find it at https://medium.com/metrosystemsro/new-ground-what-about-optimizing-the-size-of-machines-87855fbab9ef Enjoy the read!
-
Strange problem in puppet run for Ubuntu
Hi, Short sharing of a strange case. We’ve written a small manifest in order to distribute some python scripts. You can find the reference here: https://medium.com/metrosystemsro/new-ground-automatic-increase-of-kafka-lvm-on-gcp-311633b0816c When you try to run it on Ubuntu 14.04, there is this very strange error: The cause for this is as follows: Python 3.4.3 (default, Nov 12 2018, 22:25:49)…
-
Small addition for ‘cat’ in Python
Hi, There was a issue on options that aggregate any other ones, like -A for my previous post In my view the easiest way to solve it is by storing the options in a tuple. Here is the snippet So basically, you store the actual cases in a list which you convert to a tuple…
-
Linux ‘cat’ in Python – almost complete
Morning, Since I am striving to find useful content to post more often, I took homework for a ‘cat’ written in Python. It’s not elegant, and it’s not the best version but it works. Further improvements will be also posted. I must confess that there are still a couple of things to be fixed, like…
-
Automatic increase of Kafka LVM on GCP
I wrote an article for my company that was published on Medium regarding the topic in the subject. Please see the link https://medium.com/metrosystemsro/new-ground-automatic-increase-of-kafka-lvm-on-gcp-311633b0816c Thanks