Skip to content

Instantly share code, notes, and snippets.

@cslemes
cslemes / enable_modules.py
Created June 10, 2024 23:26
Habilita modulos cilium no arquivo .config_wsl
import re
# Lê o conteúdo do arquivo 'cilium_modules
config_replacements = {}
with open('cilium_modules', 'r', encoding='utf-8') as file1:
for line in file1:
line = line.strip()
# Ignora linhas vazias e comentários
if not line or line.startswith('##'):
continue
key, value = line.split('=')
@cslemes
cslemes / classificacao.py
Created May 16, 2024 14:34
Algoritmos de Classificação
# %%
import pandas as pd
df = pd.read_excel("../data/dados_cerveja_nota.xlsx")
df
# %%
df["Aprovado"] = df["nota"] >= 5
df
features = ["cerveja"]
@cslemes
cslemes / train.py
Created May 16, 2024 14:33
Treinando a arvore
# %%
import pandas as pd
df = pd.read_csv("../data/dados_pontos.csv",
sep=";")
# %%
from sklearn import model_selection
features = df.columns[3:-1]
@cslemes
cslemes / cerveja_nota.py
Created May 15, 2024 20:32
Exercício regressão linear
# %%
import pandas as pd
df = pd.read_excel("../data/dados_cerveja_nota.xlsx")
df
# %%
import matplotlib.pyplot as plt
plt.figure(dpi=600)
@cslemes
cslemes / Tutorial.md
Created September 23, 2021 23:07 — forked from dockerlead/Tutorial.md
Wireguard on CentOS 7/8

Set Up Your Own WireGuard VPN Server on CentOS

This tutorial is going to show you how to set up your own WireGuard VPN server on CentOS. WireGuard is made specifically for the Linux kernel. It runs inside the Linux kernel and allows you to create fast, modern, and secure VPN tunnel. TL;DR

Prerequisites

This tutorial assumes that the VPN server and VPN client are both running CentOS operating system.

Step 1: Install WireGuard on CentOS Server and Desktop

Log into your CentOS server, then run the following commands to install WireGuard.

# CentOS 8
@cslemes
cslemes / reclaimWindows10.ps1
Created June 1, 2021 14:16 — forked from alirobe/reclaimWindows10.ps1
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
##########
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <disassembler@dasm.cz>
# Modified by: alirobe <alirobe@alirobe.com> based on my personal preferences.
# Version: 2.20.2, 2018-09-14
# Primary Author Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
# Tweaked Source: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1/
# Tweak difference:
#
# @alirobe's version is a subset focused on safely disabling telemetry, some 'smart' features and 3rd party bloat ...