Key words Today

本文是一篇关于日常生活和个人感悟的随笔,涉及的内容包括但不限于:朋友聚会、工作中的趣事、家庭生活的点滴以及个人成长的经历等。文中提到了一些具体的场景,如在金鼎轩享用粤式早茶、在工作中遇到的挑战等。
Friends
金鼎轩
粤式早茶
郭林
啤酒
有点晕
吃鱼会变聪明
中南海红墙根下
再次的离别
研一的生活
青年公寓物业
暑假
老板
加班
干活
挨骂
不幸
车祸
神经外科
如何面对
圣人
科学家
小时的梦想
家里的战争
母亲虎vs哥哥龙
过去?
女朋友
地铁

转载于:https://www.cnblogs.com/painmoth/archive/2006/07/17/452505.html

import csv from datetime import date import os import random import configparser import requests from lxml import etree from fake_useragent import UserAgent def configInfo(): '''Reads the configuration file "config.ini" to get the file path of the csv file that stores the vocabulary and the number of appearances of a word presented. Return in a tuple with these two values''' config = configparser.ConfigParser() config.read(os.path.join(os.path.dirname(__file__), 'config.ini')) #reads the configuration file return (config.get('FILES', 'the_file'),int(config.get('APPEARANCES', 'appearances'))) #return the two vales def theDate(datePrompt, sep = " "): '''Used for acquiring a date from the user. Different prompt could be presented by modifying the argument "datePrompt", which must be a string. If there is no input, return the date of today. The default input format is "yyyy mm dd". Different separator may be specified by the argument sep.''' try: #return a date object if the input format is correct return (lambda x: date(*map(int, x.split(sep))) if x != "" else date.today())(input(datePrompt)) except (TypeError, ValueError): #if format not correct, the user will be asked again print("The date format is not correct!\n") return theDate(datePrompt, sep) def inputWords(inputWordsPrompt, sep = ","): '''Used to acquire the words that the user wants to store, and return a list with the words. The prompt and the separator can be modified.''' return [word.strip() for word in input(inputWordsPrompt).lower().split(sep)] def inputDateAndWords(inputDate, inputWordList): '''Return the full list of a date and the words.''' return [inputDate] + inputWordList def writeWords(dateWordsList, filePath): '''Writes the list with date and words to the csv file.''' with open(filePath, 'a', newline = '') as file: csv.writer(file).writerow(dateWordsList) def file2Dict(filePath): '''Re
03-09
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值