Geek Logbook

Tech sea log book

Sellenium Vs Beautiful Soup

Web scraping is a widely recognized strategy for acquiring information. Before diving into this process, it’s crucial to familiarize oneself with two essential tools. Personally, this topic initially posed a significant challenge for me when attempting to extract data from the web. These tools serve distinct purposes in web scraping and automation. Selenium is primarily

Logging in a file to avoid print statements

A video that was enlightening We need to avoid the misuse of the print statements once we master the basic tools and ideas about programming in particular and software developer in general. So, here there are some notes about loggers. Loggers have five levels, by critically: By default we typically set info and above. This

Python calculate seconds and total_seconds

If you want to calculate the total seconds between two dates. You could be tempted to do a time delta and see the seconds. But this approach will give you an unexpected result. You have to use time_second. Return the total number of seconds contained in the duration.  https://docs.python.org/3/library/datetime.html#datetime.timedelta.total_seconds Source:

Logger In python – First Approach

Besides using the print statements and the debugging tools sometimes (more and more frequently) I’m seeing in the code the logging module. According to the python documentation: This module defines functions and classes which implement a flexible event logging system for applications and libraries. The key benefit of having the logging API provided by a

Enviroments in Virtual Env

The importance of using environments As was said in Setting environments in Python it’s important to use environments for your deployment, even if these are side projects or wild repositories. But at first, I used Conda to create the environment. However, a while ago, I made the switch to Virtual Env As a point of

Testing in Python: Pytest Vs Unit test

How important are the tests? Testing is one of the most important skills we need to develop once we join the industry. In fact, knowing about testing is something that is not as evaluated as it could be. In general, the challenges are related to having logic related to programming skills or knowing about design

Setting environments in Python

When we start a project in Python we make the beginner mistake of installing each tool in any place. However, as we advance in our knowledge and looking to improve what we do we start thinking about good practice. One of them is the “virtual environment”. The official documentation says the following: A virtual environment