Skip to content

Instantly share code, notes, and snippets.

View sebastianlujan's full-sized avatar
🎯
Focusing

Sebastian sebastianlujan

🎯
Focusing
  • ratherlabs
  • Uruguay, Montevideo
View GitHub Profile
import numpy as np
import pandas as pd
from typing import Dict, List, Tuple, Optional, Union
from scipy.stats import entropy
from sklearn.preprocessing import StandardScaler
from sklearn.svm import SVC
from PIL import Image
from core.utils.math import safe_sigmoid
from core.features.texture import TextureAnalyzer

Conventional Commit Messages starline

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions, determine version and generate changelogs

Commit Message Formats

Default

@sebastianlujan
sebastianlujan / 3monitors.sh
Created December 28, 2024 23:28
Three monitors
xrandr --output eDP-1 --primary --mode 2560x1600 --pos 0x0 --rotate normal \
--output DP-4 --mode 1920x1080 --pos 2560x0 --rotate normal \
--output DP-3 --mode 1920x1080 --pos 4480x0 --rotate left
xrandr --output DP-3 --mode 1920x1080 --right-of eDP-1 --output eDP-1 --mode 2560x1600
@sebastianlujan
sebastianlujan / delete_last_commit.sh
Last active May 16, 2024 22:41
How to delete the last commit
# This will remove the last commit from HEAD and uncommited changes
# reset remove the commit
# hard remove discard all the changes and revert it to the previous state
# HEAD in this case is the merkle root tree.
git reset --hard HEAD~1
# If you want to delete the commit but keep the changes in local
git reset HEAD~1
@sebastianlujan
sebastianlujan / mirror_bitbucket_github.md
Created May 16, 2024 21:14
How to mirror a repository from A to Github, when A == Bitbucket
  • Check out the existing Repo THIS PROBABLY WILL BE A FROZEN FORK
  git clone https://[email protected]/USER/PROJECT.git

  # Add the new repository as Upstream remote
  # Upstream means: The original repository sincronized with github.

  cd PROJECT
  git remote add upstream https://github.com:USER/PROJECT.git
@sebastianlujan
sebastianlujan / puppetier.js
Created March 7, 2023 16:19
Should launch the browser and collect all NFT data
describe('Get the nft data', () => {
it('Should launch the browser and collect all data', async () => {
const browser = await puppeteer.launch({
headless: false,
devtools: false,
slowMo: 100,
})
try {
const page = await browser.newPage()
@sebastianlujan
sebastianlujan / sort_csv.py
Last active February 20, 2023 15:04
sort a csv by a condition
import csv
def read_csv_file(filename):
with open(filename, 'r') as csvfile:
reader = csv.reader(csvfile)
rows = list(reader)
return rows
# Sort rows by fourth column (Sep 10, 2022) in descending order
# Sort rows with "V" in fourth column to the front
.Thank-you {
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg width='626' height='210' viewBox='0 0 626 210' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg filter='url(%23filter0_d)'%3E%3Cpath d='M120.104 16.48C123.08 17.056 125.288 18.064 126.728 19.504C128.264 20.944 129.032 22.624 129.032 24.544C129.032 27.712 128.12 30.016 126.296 31.456C124.568 32.896 121.784 33.472 117.944 33.184C109.304 32.512 102.536 32.08 97.64 31.888C92.84 31.6 86.504 31.408 78.632 31.312C75.08 48.976 71.816 66.736 68.84 84.592C67.784 91.12 66.68 98.704 65.528 107.344C64.376 115.888 63.608 122.8 63.224 128.08C63.032 130.864 61.88 133.024 59.768 134.56C57.656 136 55.112 136.72 52.136 136.72C48.968 136.72 46.52 135.952 44.792 134.416C43.064 132.88 42.2 130.864 42.2 128.368C42.2 126.064 42.536 122.272 43.208 116.992C43.976 111.616 44.84 106 45.8 100.144C46.856 94.288 47.672 89.2 48.248 84.88C49.304 77.584 50.504 70.336 51.848 63.136C53.192 55.936 54.536 49.12 55.88 42.688C56.168 41.248 56.504 39.616 56.888 37.792C
@sebastianlujan
sebastianlujan / leer.c
Created March 8, 2018 23:40
reads the standar i/o.
info_t leer_info(int max){
info_t leido;
int num;
char *cadena = new char[max + 1];
char simbolo;
bool error = false;
scanf(" %c", &simbolo);
if (simbolo != '(')
error = true;
else {