Skip to content

Instantly share code, notes, and snippets.

View drelatgithub's full-sized avatar

Haoran Ni drelatgithub

  • University of Maryland, College Park
View GitHub Profile
@drelatgithub
drelatgithub / deterministic-unordered-map.hpp
Last active July 9, 2018 22:51
A wrapper of unordered_map that still has O(1) insertion, erasing and access, but keeps the order deterministic
#include <functional> // std::equal_to, std::hash
#include <iterator>
#include <memory> // std::alloactor
#include <type_traits> // std::conditional_t
#include <unordered_map>
#include <utility> // std::pair, std::swap
#include <vector>
////////////////////////////////////////////////////////////////////////////////
// A simple implementation of a deterministic wrapper of unordered_map.
###############################################################################
#
# csv2xlsx.py
# version 0.1
#
# Copy all data of .csv files in a directory to different sheets of a single
# .xlsx file.
#
# 3rd party libs: openpyxl, pandas
###############################################################################
@drelatgithub
drelatgithub / docin-dl.py
Last active May 11, 2024 04:01
Docin document downloader
###############################################################################
#
# Docin document downloader
#
# Valid as of 2022-12-13
#
###############################################################################
import argparse
import os
from types import SimpleNamespace