Skip to content

Instantly share code, notes, and snippets.

View sergiosvieira's full-sized avatar

Sérgio Vieira sergiosvieira

  • Fortaleza
View GitHub Profile
@sergiosvieira
sergiosvieira / replacing_seaborn_distplot.ipynb
Created February 27, 2024 11:25 — forked from mwaskom/replacing_seaborn_distplot.ipynb
A guide to replacing the deprecated `seaborn.distplot` function.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sergiosvieira
sergiosvieira / git-workflow.md
Last active January 31, 2024 01:22
Git Workflow for Small Teams

Git Workflow for Small Teams

  1. Create a development branch on your local repository.
$ git checkout --track origin/development
  1. Work on your task as usual. Remember to make frequent commits to keep track of your progress.
$ git checkout -b task_name # Create the task branch
@sergiosvieira
sergiosvieira / multiple_ssh_setting.md
Created August 15, 2022 22:16 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@sergiosvieira
sergiosvieira / gist:42428518a791f8c3f8a89b95b22484c2
Created December 7, 2021 11:42
Acentuação qtcreator + windows 10
system("chcp 65001 > nul");
@sergiosvieira
sergiosvieira / 3parts.cpp
Created April 1, 2021 17:42
Find different parts of a string when it is sliced into 3 parts.
#include <iostream>
#include <vector>
using std::cout;
using Inputs = std::vector<std::string>;
/*
Find different parts of a string when it is sliced into 3 parts.
*/
@sergiosvieira
sergiosvieira / longest.cpp
Created March 31, 2021 14:15
Find the longest contiguous sequence of integer in "a" that belongs to vector "b"
#include <iostream>
#include <vector>
#include <algorithm>
using std::cout;
using Vector = std::vector<int>;
std::ostream& operator<<(std::ostream& out, const Vector& v) {
out << "[";
@sergiosvieira
sergiosvieira / main.cpp
Created March 20, 2021 11:44
float comparasion
bool approximatelyEqual(float a, float b, float epsilon)
{
return fabs(a - b) <= ( (fabs(a) < fabs(b) ? fabs(b) : fabs(a)) * epsilon);
}
bool essentiallyEqual(float a, float b, float epsilon)
{
return fabs(a - b) <= ( (fabs(a) > fabs(b) ? fabs(b) : fabs(a)) * epsilon);
}
@sergiosvieira
sergiosvieira / script.ph
Created March 15, 2021 13:25
set volume above 100% on linux
#!\bin\bash
pactl -- set-sink-volume 0 +50%
@sergiosvieira
sergiosvieira / file.sh
Created March 13, 2021 17:48
vcpkg install dependencies
../vcpkg/vcpkg install --feature-flags=manifests,binarycaching
#include <iostream>
#include <bitset>
#include <cmath>
#include <algorithm>
#include <map>
#include <numeric>
char firstNotRepeatingCharacter(const std::string& s) {
for (const auto& c: s) {
if (s.find_first_of(c) == s.find_last_of(c)) return c;