-
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…
-
Reset Cinnamon desktop interface
Hi, I recently had an issue with Cinnamon interface, more exactly, my menu panel dissapeared. After some quick searches on the net, I found this command: gsettings reset-recursively org.cinnamon It seems to do the trick. Cheers
-
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
-
Using GCP recommender API for Compute engine
Let’s keep it short. If you want to use Python libraries for Recommender API, this is how you connect to your project. from google.cloud.recommender_v1beta1 import RecommenderClient from google.oauth2 import service_account def main(): credential = service_account.Credentials.from_service_account_file(‘account.json’) project = “internal-project” location = “europe-west1-b” recommender = ‘google.compute.instance.MachineTypeRecommender’ client = RecommenderClient(credentials=credential) name = client.recommender_path(project, location, recommender) elements = client.list_recommendations(name,page_size=4)…
-
ELK query using Python with time range
Short post. Sharing how you make an ELK query from Python using also timestamp: And that’s all! Cheers
-
Multiple field query in ELK from Python
Morning, There are a lot of pages on how to query ELK stack from Python client library, however, it’s still hard to grab a useful pattern. What I wanted is to translate some simple query in Kibana like redis.info.replication.role:master AND beat.hostname:*test AND tags:test into a useful Query DSL JSON. It’s worth mentioning that the Python…
-
Getting interactive help in IPython
Hello, I want to share with you a simple trick that I saw in a training course related to objects and classes functionality in IPython. If you want to see a short description of the object or class you are using in your notebook please use , for example, if you just imported Elasticsearch from…
-
My introduction to Linear Regression, so far
Morning, Here are some first steps that I want to share with you from my experience with regressions. I am new and I took it to step by step, so don’t expect anything new or either very complex. First thing, first, we started working on some prediction “algorithms” that should work with data available in…
-
Install zookeeper using puppet without module
Hi, In this post, I was given the task to provide a standalone zookeeper cluster with basic auth on the latest version. The reason that happened is that we are using a very old module on our Kafka clusters and a new requirement appeared to install the latest version of 3.5.5. The old module had…