Skip to content

Instantly share code, notes, and snippets.

View FernandoCelmer's full-sized avatar

Fernando Celmer FernandoCelmer

View GitHub Profile
import pandas as pd
from pathlib import Path
class ExportCSV:
def __init__(self, user):
mypath = Path().absolute()
df = pd.DataFrame(user, columns= ['User', 'E-mail'])
@FernandoCelmer
FernandoCelmer / ScrapingEmail.py
Created September 24, 2020 00:49
ScrapingEmail
# ===== Requeriments ===== #
# pip install requests
# pip install beautifulsoup4
# ===== Requeriments ===== #
from bs4 import BeautifulSoup
import requests
html = requests.get("http://www.fernandocelmer.com/").content
import inspect
def console_log(**args):
print ('---------------- ' + inspect.stack()[1][3] + ' ----------------')
print(args if args else '')
# coding: utf-8
import sys
import socket
ipAddress = sys.argv[1]
for ports in range(1,65535):
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
@FernandoCelmer
FernandoCelmer / KillPRocessWin.py
Last active September 21, 2021 04:07
Script Python para "matar" alguns processos do windows preenchidos em uma lista.
import time
import os
class KillProcessWin:
def __init__(self, process):
end_time = time.time() + 86400
countTimer = 5
sleepTime = 5
@FernandoCelmer
FernandoCelmer / Screenshot.py
Last active September 23, 2021 05:24
Script Python para capturar a tela a cada 5 minutos e salvar a captura em uma pasta pré-determinada.
# -*- coding: utf-8 -*-
"""
ScreenShot Script
"""
import os
import time
import datetime
import cv2
@FernandoCelmer
FernandoCelmer / ThisFileFolder.py
Last active September 23, 2021 05:37
Script Python para mover determinados arquivos da pasta de Downloads para outras pastas conforme a sua extensão automaticamente.
# -*- coding: utf-8 -*-
"""
Script This File Folder
"""
import os
import time
import shutil
@FernandoCelmer
FernandoCelmer / script_merge_branch.py
Last active November 26, 2021 04:58
script_merge_branch
import os
print('Option: ')
options = ['UPY-#', 'CS2-', 'No Task', 'Sem Tarefa']
for index, text_option in enumerate(options):
print(str(index) + " - "+ options[index])
option_num = int(input())
option = options[option_num]
@FernandoCelmer
FernandoCelmer / script_delete_branch.py
Last active November 26, 2021 04:59
script_delete_branch
import os
print('Option: ')
options = ['UPY-#', 'CS2-', 'No Task', 'Sem Tarefa']
for index, text_option in enumerate(options):
print(str(index) + " - "+ options[index])
option_num = int(input())
option = options[option_num]
@FernandoCelmer
FernandoCelmer / script_commit_branch.py
Last active November 26, 2021 04:59
script_commit_branch
import os
print('Option: ')
options = ['UPY-#', 'CS2-', 'No Task', 'Sem Tarefa']
for index, text_option in enumerate(options):
print(str(index) + " - "+ options[index])
option_num = int(input())
option = options[option_num]