阿毛Alex - 2025年6月15日
type: channel
link: https://alexmao.com/index.php/2025/06/15/
description: 生命不息，折腾不止
items: Python的lists操作
items: Python金融计算公式
items: strapi docker启动命令

Python的lists操作
type: item
date: 2025-06-15T13:25:18+00:00
description: list.append (x)Add an item to the end of the list.list.extend (x)Extend the list by appending all the items at the end of the list.list.insert (i,x)Insert an item at any given position within the list. The first argument 'i', is the index of the item before which you want to insert something. To insert something at the beginning of the list, you may type list.insert (0,x)list.remove (x)Remove the first item from the list whose value is 'x'. It is an error if there is no such item.list.pop (i)Remove any item from any given position (index) in the list. If no index is specified, it removes and returns the last element from the list.list.index (x)It returns a zero-based index in the list of the first item whose value is x. Raises an error of there is no such item as 'x'.list.count (x)Returns the number of times 'x' appears in the listlist.reverse ()It reverses the items of the list.list.sort ()It sorts the items in the list.

Python金融计算公式
type: item
date: 2025-06-15T13:11:00+00:00
description: # Formula for calculating Future Value FV = PV * ((1+r) ** n) # Formula for calculating Present Value PV = FV / ((1 + r) ** n) # Formula for compounding FV = PV * ((1+(r/n)) ** (n*t)) # Formula for Annuity payments, given Future Value AP = (FV * r) / (((1 + r) ** n - 1)*(1+r)) # Formula for PV, given Annuity payments PV = (AP * (1 - ((1 + r) ** -n))) / r # Formula for PV, given Annuity payments PV = (AP1 * (1 - ((1 + r) ** -n))) / r # Formula to calculate Annuity Payments, given PV #AP = (r * PV) / (1 - ((1 + r) ** -n))

strapi docker启动命令
type: item
date: 2025-06-15T11:46:00+00:00
description: 后台运行：docker run -d --rm \ -v $(pwd):/srv/app \ -p 1337:1337 \ --name strapi-container \ node:20 \ sh -c "cd /srv/app && npm rebuild better-sqlite3 && npm run dev" 非后台运行：docker run -it --rm -v $(pwd):/srv/app -p 1337:1337 node:20 sh -c "cd /srv/app && npm rebuild better-sqlite3 && npm run dev"