Skip to content

Instantly share code, notes, and snippets.

View rdenadai's full-sized avatar
🐍
But still haven't found what I'm looking for...

⟠ Rodolfo De Nadai rdenadai

🐍
But still haven't found what I'm looking for...
View GitHub Profile
@rdenadai
rdenadai / keybindings.json
Last active June 21, 2024 10:32
vscode settings for python development
// Place your key bindings in this file to override the defaultsauto[]
[
{
"key": "alt+q",
"command": "workbench.action.terminal.toggleTerminal",
"when": "terminal.active"
},
{
"key": "ctrl+shift+[BracketLeft]",
"command": "-workbench.action.terminal.toggleTerminal",
@rdenadai
rdenadai / python_expert_path.md
Last active April 20, 2024 00:43
My take into build a basic structure to dictate how to become a Python Expert ... from basic to specialist ?

Python Expert Path

Beginner

  • Basic syntax
    • Variables types:
      • bool, int, float, str, byte, complex, None
    • Conditionals:
      • if, else, elif, for, while, match
  • Functions: simple use, and known what first class citizen is (concept)
@rdenadai
rdenadai / installer.sh
Last active November 22, 2023 09:24
Super complex set of script and text files to build a full feature computer with a lots of python libs, java and other stuff like ffmpeg, opencv, llvm inside a vagrant script or linux install!!!
# The commands must be executed in the order bellow! Not doing this may break the installation!
# Install python-software-properties if you get a 'command not found'
# sudo apt-get install python-software-properties
# In case you need to install setuptools
# Keep in mind that doing this may destroy pip installation of setuptools
# Instead you can pip install setuptools ... :)
# wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo python
@rdenadai
rdenadai / compare.sh
Last active November 8, 2023 12:58
Bash script which generate checksum from a list of dirs and files located inside a file.
#!/usr/bin/env bash
checksum() {
FILE=$1
if [ "$ALGO" = "SHA1" ]; then
sha1sum $FILE
else
md5sum $FILE
fi
}

Javascript Expert Path

Beginner

  • Basic syntax
    • Variables types:
      • Variable declaration: var, let and const
      • float, integer, string, boolean, null, undefined
    • Operators:
  • Arithmetic: +, -, *, /, %, ++, --
@rdenadai
rdenadai / requirements.txt
Last active June 4, 2023 00:53
Default requirements.txt with lots of libs that i use
pip
# pipenv
poetry
sphinx
black
isort
flake8
pylint
mypy
@rdenadai
rdenadai / names.py
Last active November 16, 2022 17:07
Carrega o nome de pessoas (em português) de um site específico, cria uma listagem e salva em arquivo. Nomes masculinos e femininos.
import asyncio
import gc
from concurrent.futures import ProcessPoolExecutor
from enum import Enum
from functools import partial, wraps
from itertools import chain
from multiprocessing import cpu_count
from time import perf_counter
from bs4 import BeautifulSoup as bsoup
@rdenadai
rdenadai / cam.py
Last active August 24, 2022 13:56
Open a window with webcam image
from tkinter import Label, Tk
import cv2
import PIL
from PIL import Image, ImageTk
width, height = 800, 600
cap = cv2.VideoCapture(0)
cap.set(cv2.CAP_PROP_FRAME_WIDTH, width)
cap.set(cv2.CAP_PROP_FRAME_HEIGHT, height)
@rdenadai
rdenadai / torrents.py
Last active August 10, 2022 20:39
A simple python script that downloads a deezer playlist and bam! download magnetic files from pirate bay or monova and put on transmission torrent client... keep in mind that you need transmission to run this, open it and configure the remote option in preferences!
# DEPENDENCIES
# LINUX INSTALLS!
# apt-get install transmission firefox python-dev python-pip
# PYTHON LIBS NEED IT!
# pip install requests beautifulsoup4 transmissionrpc pyopenssl ndg-httpsclient pyasn1 selenium
import requests as req
import transmissionrpc
@rdenadai
rdenadai / python_update.md
Last active September 29, 2021 19:25
Update python on debian
$> apt-get update && sudo apt-get upgrade

$> apt-get install -y make build-essential libssl-dev zlib1g-dev

$> apt-get install -y libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm

$> apt-get install -y libncurses5-dev  libncursesw5-dev xz-utils tk-dev

$> wget https://www.python.org/ftp/python/3.7.7/Python-3.7.7.tgz