阿毛Alex - 2025年6月
type: channel
link: http://www.alexmao.com/index.php/2025/06/
description: 生命不息，折腾不止
items: 后台运行paddleocr
items: free privacy policy
items: Python的sets操作
items: Dictionary的方法
items: Python的lists操作
items: Python金融计算公式
items: strapi docker启动命令

后台运行paddleocr
type: item
date: 2025-06-19T09:49:34+00:00
description: docker run -it --detach --name paddleocr \ -v $PWD:/paddle \ -p 9000:9000 \ paddlepaddle/paddle:latest

free privacy policy
type: item
date: 2025-06-18T08:03:10+00:00
description: https://app.freeprivacypolicy.com/国外的人真是慷慨

Python的sets操作
type: item
date: 2025-06-16T09:43:09+00:00
description: x.union(y) This method returns all the unique items that are present in the two sets, as a new set. x_set | y_set x.intersection(y) This method returns the common items that are present in two sets, as a new set. x_set & y_set difference_update () This method removes all the elements of 'set 2' common to 'set 1' in 'set1'. It updates 'set 1'. x.isdisjoint(y) This method returns True if two sets have null intersection. y.issubset(x) This method returns True for 'Set 2', if all the elements of 'Set 2' are present in 'Set 1' x.issuperset(y) This method returns True for 'Set 1' if all the elements of Set 2 are present in 'Set 1'. x.add(e) It adds a single item to the set and updates the set. x.discard(e) It removes a single item from the set and updates it. x.pop () It pops and returns any arbitrary item from the set. x.copy () It creates a shallow copy of any set. x.clear() It clears all the items of the set.

Dictionary的方法
type: item
date: 2025-06-16T09:24:05+00:00
description: len (x_dict)To know the number of key: value pairs in the dictionary.x_dict.keys ( )Returns all the 'keys' of dictionariesx_dict.values ( )Returns all the 'values' of dictionariesThe del statementIt is used for deleting any keys from the dictionary.x_dict.pop (key)It will pop a 'value' of the required key.sorted (x_dict)The dictionary will get sorted by its values.x_dict.clear ()Clears all the content of the dictionary

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"