From: 03 April 2025 - To: 03 May 2025
Total Time: 186 hrs 53 mins
Python 76 hrs >>>>>>>>>>--------------- 40.67 %
C++ 52 hrs 31 mins >>>>>>>------------------ 28.11 %
CMake 20 hrs 11 mins >>>---------------------- 10.80 %
Other 12 hrs 24 mins >>----------------------- 06.64 %
JSON 6 hrs 26 mins >------------------------ 03.44 %
Skills and badges
- 💻 C / C++ / Python
- 🖥️ Rust / Cython / Java
- 🗃️ Object-Oriented Programming
More about me
- 🔭 I’m currently working on learning OpenCV4 with Python3 and Qt5.
- 🌱 I’m currently learning Rust.
- 📤 Most used line of code
git commit -m "Initial Commit"
. - 🤔 I’m looking for help with advanced Python and Machine Learning.
- 📫 How to reach me: xuhua.huang.io@gmail.com
- ⚡ Fun fact: code blooded animal
std::code_blooded
.
❤️ Modern C++
/*****************************************************************//**
* \file trimstr.hpp
* \brief Demonstration of handy constant expressions that trim
* `std::string` at compile time with `std::ranges`
*
* $ g++ trimstr.hpp -o trimstr.o -std=c++23 -Wall -Wextra -Wpedantic
*
* \author Xuhua Huang
* \date March 2022
*********************************************************************/
#if defined __has_include
#if __has_include(<ranges>) && __has_include(<string>)
#include <ranges>
#include <string>
#else
#error "Require std::ranges and std::string library!"
#endif
#endif
inline constexpr auto trim_front = std::views::drop_while(::isspace);
inline constexpr auto trim_back = std::views::reverse
| std::views::drop_while(::isspace)
| std::views::reverse;
inline constexpr auto trim_spaces = trim_front | trim_back;
std::string trim_str(const std::string& str) {
// std::rangesnext::to in C++23 proposal
// that converts ranges to a container
return str | trim_spaces | std::rangesnext::to<std::string>;
}