๐
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
| from typing import Iterable, List, Union, Set | |
| class Graph: | |
| def __init__(self) -> None: | |
| # Adjacency set representation. | |
| # key: node name, value: adjacency node name set. | |
| self.edges = dict() |
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
| #include <stdio.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| #include <netdb.h> | |
| #include <sys/types.h> | |
| #include <sys/socket.h> | |
| #include <arpa/inet.h> | |
| int | |
| lookup_host (const char *host) |
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
| # make git submodules usable | |
| # This overwrites the 'git' command with modifications where necessary, and | |
| # calls the original otherwise | |
| git() { | |
| if [[ $@ == clone* ]]; then | |
| gitargs=$(echo "$@" | cut -c6-) | |
| command git clone --recursive $gitargs | |
| elif [[ $@ == pull* ]]; then | |
| command git "$@" && git submodule update --init --recursive | |
| elif [[ $@ == checkout* ]]; then |