Alembic is a powerful tool to manage database generating migrations and versions of tables, views and etc enabling a easy management of your database. Now you have to edit the alembic.ini and put your connectionstring using the field sqlalchemy.url Now let’s create the first table definition He gonna create a migration file and you can…
Tag: python
Image segmentation with Python Pixellib
Deep learning libs to process images and videos and execute tasks like segmentation, classification and etc… Pixelib now is using tensorflow and pytorch as a core so let’s do some tests using the pytorch version. 1 – Installing the libs 2 – Importing the libs and downloading an image as example: 3 – Creating a…
Creating a Micro HttpServer with Python 3
Sometimes we need just a microserver to simulate or do some tests using our APIS so python can be used to create this micro httpserver in a simple way! 🙂 Case 1 We just need to serve some html files so, go the path that you need and just: Case 2 We need to perform…
Trace Code in Python
Use a decorator to trace your functions Our goal is to create a reusable way to trace functions in Python. We do this by coding a decorator with Python’s functools library. This decorator will then be applied to functions whose runtime we are interested in. Tracing Decorator: @tracefunc The code below represents a common decorator pattern that…
Python tricks :)
Formatting big integers – Python 3.6+ Grouping Hexadecimal and bits Lib pathlib to manipulate system’s path String Format with interpolation – Python 3.6+ Reference
Moving the mouse cursor with Python
Moving the mouse cursor using python is really easy using python with package pyautogui
Gerando Crop (clip) de um Raster com ShapeFile
Gerando Crop (clip) de um Raster com ShapeFile
Chamadas assÃncronas com GNU Parallel
Chamadas assÃncronas com GNU Parallel