This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# TEST GIST FOR THE SUBJECT HPI (2024) | |
# MIT License | |
# | |
# Copyright (c) 2024 José Miguel Santana Núñez | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import networkx as nx | |
import matplotlib.pyplot as plt | |
def draw_weighted_graph(G, pos=None, | |
node_size=200, | |
edge_width=3, | |
font_size=12, | |
node_color='red', | |
color_map='Blues'): | |
"""Draw a networkx graph with weighted edges""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global alias.cmp '!f() { git status && | |
read -p "Are you sure? " -n 1 -r && | |
if [[ $REPLY =~ ^[Yy]$ ]] | |
then | |
git add -A && git commit -m "$@" && git push | |
fi; }; f' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global alias.cmp '!f() { git status && | |
read -p "Are you sure? " -n 1 -r && | |
if [[ $REPLY =~ ^[Yy]$ ]] | |
then | |
git add -A && git commit -m "$@" && git push | |
fi; }; f' |