CoolMind


If you cannot measure it, you cannot improve it.

PyTorch slow inference

Our online systems support PyTorch inference. It is very slow recently. Previously there were not so many jobs running, so the CPU usage was low, b...

Arrays and dict in bash

Most languages will have builtin data structures such as array(list) or dict(hashtable). Is it interesting that whether bash has similar choices? ...

Build a menubar macos App using PyQt5 and PyInstaller

PyQt is a python package that can be used to develop GUI applications even complex applications. In this blog, we will develop a menubar note appli...

Partially render in Jinja

A Jinja template can be rendered. Sometimes the data we need can not be collected in just one place. It will be helpful if we can render a template...

Linux split

Linux 中有很多易用的命令行工具。split 就是其中之一。介绍实际中使用的几个比较常用的分割文件的方法。 按照固定行切分 自动切分行 切分文件的方式 Reference Macos 中的 split 命令和 linux 行为不太一致。 按照固定行切分 spli...

std::transform not working with std::toupper

ctype 中定义了一些比较实用的函数,例如 toupper, tolower, isalpha 等等。在 C++ 中如何实用这些函数呢?使用 cctype,然后就可以在 std 的命名空间中使用这些函数。 背景 问题 解决方案 刨根问题 toupper...

python pickle

torch.save 和 torch.load 默认使用的 pickle 模块进行序列化和反序列化。在调用 torch.load 时偶尔会遇到缺失类的问题。这篇文章仔细分析了 pickle 的源码,并且对于 缺失类也提供了一些解决方案。 背景 struct By...

Python Jinja2

Jinja2 is a fast, expressive, extensible templating engine. This blog records the problems or requirements I met during my development. Basic u...