Making Vocabulary Memorization Less Boring with LLMs and Telegram Bots

Always Abandoning English Vocabulary? Learning from Duolingo 🦉 to Let Words Remind You Memorizing vocabulary is inevitable in learning English. From primary school to graduate school, and even in some jobs, you need to remember words. But gnawing on vocabulary books or rigidly memorizing on a phone is extremely inefficient. Now that LLMs are so popular, why not use them? After all, the ‘L’ in LLM stands for Language. LLMs might lack precision in other rigorous tasks, but languages like English are their forte. If technology can solve a problem, don’t trouble yourself! This article shares how to use the Eudic Dictionary API, an LLM, and a Telegram Bot to create an English vocabulary learning assistant, making vocabulary memorization less painful. Of course, you might find it annoying after a few days, as the inspiration comes from the Duolingo App 🦉. ...

April 19, 2024 · zhoukuncheng

Concurrency Pattern Differences between Python and Go

Concurrency in Python In Python, early concurrency methods were dominated by traditional multi-processing and multi-threading, similar to Java. At the same time, there were many third-party asynchronous solutions (gevent/tornado/twisted, etc.). In the Python 3 era, the official asyncio library and async/await syntax were introduced as Python’s official coroutine implementation, which gradually became popular. Processes Example of multi-processing programming: from multiprocessing import Process def f(name): print('hello', name) if __name__ == '__main__': p = Process(target=f, args=('bob',)) p.start() p.join() The API of multiprocessing is close to threading, making it relatively easy to create multi-process programs. It is a solution recommended by Python officially to bypass the GIL restriction of multi-threading. However, it should be noted that the parameters for creating a process need to be pickle-serializable. It is best to use process-safe data structures like Pipe and Queue (Official Programming guidelines). ...

August 30, 2021 · zhoukuncheng

Insights on Compiling CPython

When Do You Need to Compile CPython Yourself? Most operating systems provide compiled CPython versions. Generally, installing through a package manager is sufficient. However, in some cases, you need to compile CPython yourself to meet specific requirements: The Python version provided by the OS is too old, and the Python official website or system package repositories do not provide pre-compiled new versions of Python. Pre-compiled versions do not meet performance or extension requirements, for example, compiler optimizations are not enabled, or OpenSSL/SQLite versions do not meet requirements. ...

July 24, 2020 · zhoukuncheng