This file contains 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
[user] | |
name = Yu-Sheng Lin | |
email = johnjohnlys@gmail.com | |
[core] | |
editor = nvim | |
pager = | |
[push] | |
default = current | |
[color] | |
ui = auto |
This file contains 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
#!python | |
# usage: if you have an xxx.odg, then execute `./odg2svgs.py xxx` | |
import sys | |
import subprocess | |
import xml.etree.ElementTree as ET | |
kBASENAME = sys.argv[1] | |
subprocess.run(["libreoffice", "--draw", "--headless", "--convert-to", "svg", kBASENAME+".odg"], check=True) | |
tree = ET.parse(kBASENAME + ".svg") |
This file contains 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 <algorithm> | |
#include <utility> | |
#include <stack> | |
#include <vector> | |
using namespace std; | |
#define null nullptr | |
struct TreeNode { | |
int val; | |
TreeNode *left; |