一些有趣的HTTPS和TCP面试题

Posted on Mon 22 April 2024 in Computer Science

分享一些有趣的TCP和HTTP面试题,并给出一些解答。


Continue reading

从requirements.txt升级到Poetry

Posted on Sat 23 March 2024 in Computer Science • Tagged with Python

将包管理方式从requirements.txt升级到Poetry


Continue reading

解决Foobar挑战(四)- 终篇

Posted on Sat 30 September 2023 in Computer Science • Tagged with Google Foobar

接上回书,我们来到了Foobar挑战的第五层,题目越来越困难了。本题主要涉及一些数论和组合数学的知识点。


Continue reading

Airline Empire之使用二次规划解决航线的最佳座位排布

Posted on Mon 21 August 2023 in Computer Science

本文探讨了在线航空公司经营游戏Airline Empires中,如何通过最佳座位配置来提升盈利能力。从游戏机制到座位优化,逐步引导读者了解如何运用混合整数二次规划来提升游戏中的航线盈利。This article explores how optimal seating configurations can be used to improve profitability in Airline Empires, an online airline operating game. From game mechanics to seat optimization, the reader is guided step-by-step through how to use Mixed-Integer Quadratic Programming (MIQP) to improve airline profitability in the game.


Continue reading

解决Foobar挑战(三)

Posted on Sat 13 May 2023 in Computer Science • Tagged with Google Foobar

接上回书,我们来到了Foobar挑战的第四层,题目越来越困难了。这篇文章给出了Foobar Level 4 的两道题 Running with Bunnies 和 Distract the Trainers 的解题思路和python代码。这一层要求我们掌握图相关的算法,包括Dijkstra,Floyd-Warshall,以及二分图和网络流算法,如匈牙利算法和Hopcroft-Karp算法。


Continue reading

解决Foobar挑战(二)

Posted on Sat 22 April 2023 in Computer Science • Tagged with Google Foobar

接上回书,我们来到了Foobar挑战的第三层。每一层都比上一层更加困难。这篇文章给出了Foobar Level 3 的三道题 Queue To Do, Hey, Fuel Injection Perfection 和 Doomsday Fuel 的解题思路和python代码。这一层要求我们掌握一些位运算,贪心算法,线性代数和概率论的知识。


Continue reading

解决Foobar挑战(一)

Posted on Fri 21 April 2023 in Computer Science • Tagged with Google Foobar

因为机缘巧合,我偶然点开了Google的Foobar Challenge页面,发现自己仍然可以登陆并继续Foobar旅程。这篇文章简单介绍了Foobar挑战的机制,并给出了Foobar Level 2 的两道题 Gearing Up for Destruction 和 Hey, I Already Did That! 两道题的解题思路和python代码。


Continue reading

手把手教你在树莓派4B上运行LLaMA 7B模型

Posted on Wed 15 March 2023 in Computer Science

本文详细描述了我是如何一步步在树莓派4B上运行LLaMA模型。LLaMA是由Meta AI发布的一个大语言模型。ggerganov/llama.cpp是一个由C++实现的LLaMA移植版本,并使用4-bit量化技术以将模型适配至个人设备上。超大型语料模型从未如此唾手可得。在树莓派上获得你的个人chatgpt。如果你对树莓派、LLaMA模型或大型语言模型感兴趣,那么本文一定会对你有帮助。How I run the LLaMA model step by step on a Raspberry Pi 4B. LLaMA is a large language model released by Meta AI. ggerganov/llama.cpp is a C++ implementation of the LLaMA port, which uses 4-bit quantization techniques to adapt the model to personal devices. A large-scale Machine Learning model has never been so readily available for normal people. If you are interested in Raspberry Pi, LLaMA model, or large-scale language models, this article will provide you with useful information.


Continue reading

[翻译]保卫自由的互联网,拒绝Web3

Posted on Sat 18 February 2023 in Computer Science • Tagged with Blockchain

原文标题:Keep the web free, say no to Web3

原文链接:https://yesterweb.org/no-to-web3/

新的想法,新的思潮,下一代互联网,Web3对每个人的意义都是独一无二的。币圈的铁杆粉丝们把这种基于区块 …


Continue reading

用 Python 进行代码覆盖率检测:coverage.py 和diff-cover 的使用方法

Posted on Sun 05 February 2023 in Computer Science • Tagged with Python

在重构项目时,我们经常需要确认代码测试的覆盖率。这是为了确保没有任何部分遗漏或者错误,从而使重构变得更安全 …


Continue reading