Skip to content

Instantly share code, notes, and snippets.

@GiliardGodoi
GiliardGodoi / DvC - Data Version Control.md
Last active November 28, 2023 02:12
Nota sobre DvC.
def measure_certainty(df, bins=[0.75, 0.85, 0.95], diff_max=0.10):
bins=[0.75, 0.85, 0.95] # bins deve corresponder com o array de categorias
categories = np.array(['tema não identificado', 'dúvida', 'semelhante ao tema', 'certeza'])
columns = [c for c in df.columns if c.startswith("Proba")]
values = -(df[columns].values) # valores das probabilidades
idxs = np.argsort(values, axis=1) # indexes que ordena os vetores (linhas) das probabilidades
ordered = -(np.take_along_axis(values, idxs, axis=1)) # pode ser substituido simplesmente por np.sort
binned = np.digitize(ordered[:, 0], bins)
import random
from evol import Population, Evolution
CHROMO_LENGTH = 30
CHROMO_PARTITION = 10
TARGET_VALUE = 52
POPULATION_SIZE = 100
def random_chromosome(size):
@GiliardGodoi
GiliardGodoi / remove-big-file.sh
Created April 17, 2018 18:12 — forked from BrunoGrandePhD/remove-big-file.sh
Remove a large committed file from your Git repository.
# The commands below are a guide to remove a large file that has been
# accidentally committed to a Git repository's history. If the file is
# larger than 100 MB, GitHub will prevent you from pushing your latest
# commits. The annotated steps below should help you remove the large
# file from your commit history, even if you've made new commit since.
# Some Git users advise against rebasing. You can safely use it here
# because you haven't published your changes yet.
# So, you first need to rebase your current branch onto the point that
@GiliardGodoi
GiliardGodoi / git.md
Last active April 23, 2020 01:09 — forked from leocomelli/git.md
Lista de comandos úteis do GIT

GIT

Estados

  • Modificado (modified) ou área de trabalho (working directory)
  • Preparado (staged/index)
  • Consolidado (comitted)

Ajuda

height: 500
width: 700
@GiliardGodoi
GiliardGodoi / .block
Last active May 1, 2017 18:42
Bar Chart Example
license : mit
height : 550
@GiliardGodoi
GiliardGodoi / .block
Last active May 29, 2017 10:23
Voting Schedule
license : mit
height : 960