Tumgik
vespasiane · 4 months
Text
Dataset in Python - DataFrame
Spark’s primary abstraction is a distributed collection of items called a Dataset. Datasets can be created from Hadoop InputFormats (such as HDFS files) or by transforming other Datasets. Due to Python’s dynamic nature, we don’t need the Dataset to be strongly-typed in Python. As a result, all Datasets in Python are Dataset[Row], and we call it DataFrame to be consistent with the data frame concept in Pandas and R.
0 notes
vespasiane · 5 months
Text
the left shift (<<) and right shift (>>) operators in Python
Here is an explanation of the left shift (<<) and right shift (>>) operators in Python:
The left shift operator (<<) shifts the bits of a number to the left by a specified number of positions. Shifting left has the effect of multiplying the number by 2 for each position shifted. For example:
a = 5 # Binary: 0b101 a << 1 # Binary: 0b1010 = 10 a << 2 # Binary: 0b10100 = 20
Shifting left by n positions multiplies the number by 2^n.
The right shift operator (>>) shifts the bits of a number to the right by a specified number of positions. Shifting right has the effect of dividing the number by 2 for each position shifted (and rounding down). For example:
a = 5 # Binary: 0b101 a >> 1 # Binary: 0b10 = 2 a >> 2 # Binary: 0b1 = 1
Shifting right by n positions divides the number by 2^n, rounding down.
The left and right shift operators act bitwise on the binary representation of the number. This allows you to efficiently multiply or divide numbers by powers of two.
0 notes
vespasiane · 5 months
Text
do not use eval() for simple expressions or for expressions involving small DataFrames
You should not use eval() for simple expressions or for expressions involving small DataFrames. In fact, eval() is many orders of magnitude slower for smaller expressions or objects than plain Python. A good rule of thumb is to only use eval() when you have a DataFrame with more than 10,000 rows.
0 notes
vespasiane · 6 months
Text
P-Value is the probability that a difference in your data might occur as a matter of chance
So how do you go about determining whether there is a statistically significant difference in your data? One way this is done in data analytics is by determining a p-value for your analysis. Technically, a p-value represents the probability that a difference between two data measurements was just a matter of random chance (the way 52 tails versus 48 heads might be), rather than being a statistically significant difference (the way 68 tails versus 32 heads would be).
Put another way, a very low p-value represents a low probability that a difference is a matter of random chance and, therefore, a high probability of statistical significance.
0 notes
vespasiane · 6 months
Text
The range of skewness
The range of skewness for a fairly symmetrical bell curve distribution is between -0.5 and 0.5; moderate skewness is -0.5 to -1.0 and 0.5 to 1.0; and highly skewed distribution is < -1.0 and > 1.0. In our case, we have ~1.7, so it is considered highly skewed data.
There are ways to correct for skewness of the data. For example, log transform (np.log), Square Root Transform (np.sqrt) and the Box-Cox Transform (stats.boxcox from the scipy stats library). To learn more about these methods, please check out this article.
0 notes
vespasiane · 6 months
Text
Seegers setzte ein Grinsen auf, das eigentlich ein Lächeln hatte werden wollen, und zwinkerte ihm zu. Es sah seltsam verzerrt aus, als passe so viel Mimik auf einmal gar nicht in sein hageres Gesicht.
Tumblr media
0 notes
vespasiane · 6 months
Text
晚风拂柳笛声残,夕阳山外山
0 notes
vespasiane · 6 months
Text
run the WordCount example with an input text and see how the content of the input file is processed by WordCount
Start a new terminal
Download hadoop-3.2.3.tar.gz to your theia environment by running the following command.
curl https://dlcdn.apache.org/hadoop/common/hadoop-3.3.6/hadoop-3.3.6.tar.gz --output hadoop-3.3.6.tar.gz
Extract the tar file in the currently directory.
tar -xvf hadoop-3.3.6.tar.gz
Navigate to the hadoop-3.3.6 directory.
cd hadoop-3.3.6
Check the hadoop command to see if it is setup. This will display the usage documentation for the hadoop script.
bin/hadoop
Run the following command to download data.txt to your current directory.
curl https://cf-courses-data.s3.us.cloud-object-storage.appdomain.cloud/IBM-BD0225EN-SkillsNetwork/labs/data/data.txt --output data.txt
Run the Map reduce application for wordcount on data.txt and store the output in /user/root/output
bin/hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-3.3.6.jar wordcount data.txt output
Once the word count runs successfully, you can run the following command to see the output file it has generated. You should see part-r-00000 with _SUCCESS indicating that the wordcount has been done.
ls output
Run the following command to see the word count output.
cat output/part-r-00000
0 notes
vespasiane · 6 months
Text
纯真而不欠闻达,善良而不失坚强,把生命高举在尘俗之上,又融化于社会之中,这应当是我们这一代人的共同追求。
Tumblr media Tumblr media
0 notes
vespasiane · 6 months
Text
Likonomics
四海齐名白与刘,百年交分两绸缪。 同贫同病退闲日,一死一生临老头。 杯酒英雄君与操,文章微婉我知丘。 贤豪虽殁精灵在,应共微之地下游。
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
0 notes
vespasiane · 6 months
Text
白居易
51个
2023/10/20: 唐代存诗最多的白居易,流传至今的诗歌也只有三千多首
白居易是唐代存诗最多的一位诗人,他的诗歌流传到现在的有三千多首。他也是唐代继李白、杜甫之后最杰出的一个诗人。
2023/10/20: 中国文学由雅到俗、由士大夫正统文学到市民文学、由抒情到叙事转变中的白居易叙事诗
《长恨歌》、《琵琶行》是白居易叙事诗的杰出代表,它们在故事的曲折完整、描写的细致生动和抒情气氛的浓郁等方面,都有突出成绩,都显示了中国古代文人叙事诗所达到的艺术高度,体现出古代叙事诗鲜明的民族特色。并且在中国封建时代文学由雅到俗的转变、由封建士大夫正统文学到市民文学的转变、由抒情到叙事的转变过程中,起到了无可替代的昭示作用。
◆ 一、十年之间三登科第(772—806)
2023/10/20: 男性情史悲剧助于闺怨描写
“乐天深于诗,多于情者也”,这是友人王质夫对他的评价,白居易亦自诩是“情所钟者”(《祭符离六兄文》),他与湘灵那段“两心之外无人知”(《潜别离》)的悲剧经历,有如春梦朝云长萦心头,因此在诗篇中总给那些失宠、幽闭及婚姻情感不幸的女子以一种特别的同情。
◆ 邯郸冬至夜思家
2023/10/20: 我意君心
《初与元九别后忽梦见之及寤而书忽至》:“以我今朝意,想君此夜心。”
◆ 长恨歌
2023/10/20: 君王掩面,黄埃散漫。芙面柳眉,夕殿萤飞
渔阳鼙鼓动地来,惊破霓裳羽衣曲。九重城阙烟尘生,千乘万骑西南行。翠华摇摇行复止,西出都门百余里。六军不发无奈何,宛转蛾眉马前死。花钿委地无人收,翠翘金雀玉搔头。君王掩面救不得,回看血泪相和流。黄埃散漫风萧索,云栈萦纡登剑阁。峨嵋山下少人行,旌旗无光日色薄。蜀江水碧蜀山青,圣主朝朝暮暮情。行宫见月伤心色,夜雨闻铃肠断声。天旋日转回龙驭,到此踌躇不能去。马嵬坡下泥土中,不见玉颜空死处。君臣相顾尽沾衣,东望都门信马归。归来池苑皆依旧,太液芙蓉未央柳。芙蓉如面柳如眉,对此如何不泪垂。春风桃李花开日,秋雨梧桐叶落时。西宫南苑多秋草,宫叶满阶红不扫。梨园弟子白发新,椒房阿监青娥老。夕殿萤飞思悄然,孤灯挑尽未成眠。迟迟钟鼓初长夜,耿耿星河欲曙天。鸳鸯瓦冷霜华重,翡翠衾寒谁与共。
2023/10/21: 仙袂飘飘
风吹仙袂飘飘举,犹似霓裳羽衣舞。
2023/10/21: 通过对史实的改造与取舍,“净化”、“淡化”、“美化”诗中李、杨的形象,不影响他们令人同情、赞颂
如“杨家有女初长成,养在深闺人未识。天生丽质难自弃,一朝选在君王侧”,通过对杨妃入宫史实的改造与取舍,通过“净化”、“淡化”、“美化”诗中李、杨的形象,使他们成为令人同情、赞颂的角色。
2023/10/21: 《长恨歌》悲剧源于爱得太过分、太出格,不顾爱情的社会影响
李、杨的爱情悲剧,既非封建婚姻、封建礼教所造成,也很难归咎于某个奸相如安禄山、杨国忠,当然更不能归咎于“六军不发”的首领陈玄礼。他们的悲剧根源就在于过度沉溺于欢爱,到了“从此君王不早朝”的程度,结果也就必然会引起“渔阳鼙鼓动���来”,导致生离死别的悲剧结局。占了情场,误了朝纲,又反过来毁灭了爱情。从抽象意义上说,《长恨歌》所描写的是一曲因为爱得太过分、太出格而引起的悲歌,又是一曲不顾爱情的社会影响而引起的悲歌。因此,为了维护爱情的永恒,必须把爱情控制在适当的范围内,摆在适当的位置上。
2023/10/21: 丹青画出竟何益?不言不笑愁杀人
汉武帝,初丧李夫人。夫人病时不肯别,死后留得生前恩。君恩不尽念未已,甘泉殿里令写真。丹青画出竟何益?不言不笑愁杀人。
2023/10/21: 魂之不来君心苦,魂之来兮君亦悲
九华帐深夜悄悄,反魂香降夫人魂。夫人之魂在何许?香烟引到焚香处。既来何苦不须臾,缥缈悠扬还灭去。去何速兮来何迟?是耶非耶两不知。翠蛾仿佛平生貌,不似昭阳寝疾时。魂之不来君心苦,魂之来兮君亦悲。背灯隔帐不得语,安用暂来还见违。
2023/10/21: 诗人毕竟“不能忘情”,感到无法抗拒“倾城色”的“惑”,所以卒言“不如不遇”。一旦遇上,只能“生亦惑,死亦惑”了
白居易在《胡旋女》、《八骏图》、《古冢狐》等讽谕诗和政论文章中,对历史上真实的“一人荒乐万人愁”式的爱情毫不含糊地持批评讽刺态度,而这首诗却有些“气短”,因为诗人毕竟“不能忘情”,感到无法抗拒“倾城色”的“惑”,所以卒章显志之言是“不如不遇”。如果再追问一句,一旦遇上了怎么办?那就只能“生亦惑,死亦惑”了。因此,有一个从政治角度还是从人性人情角度看待李、杨爱情的不同,从理智、政治上说,这种“惑”要不得,误国害民害己,应该批判;从情感、人情上说,他又觉得这种“惑”有其合情、值得同情甚至赞颂的一面。看来,作《长恨歌》时的白居易“多情”诗人浪漫气质要重得多,这正是他把《长恨歌》写成一曲哀感顽艳的爱情悲歌的主观原因。
◆ 观刈麦
2023/10/21: 南风陇黄
夜来南风起,小麦覆陇黄
2023/10/21: 念此私自愧,尽日不能忘
听其相顾言,闻者为悲伤。家田输税尽,拾此充饥肠。今我何功德,曾不事农桑。吏禄三百石,岁晏有余粮。念此私自愧,尽日不能忘。
2023/10/21: 微雨众卉新,一雷惊蛰始
微雨众卉新,一雷惊蛰始。田家几日闲,耕种从此起。
2023/10/21: 北风利如剑,布絮不蔽身
八年十二月,五日雪纷纷。竹柏皆冻死,况彼无衣民!回观村闾间,十室八九贫。北风利如剑,布絮不蔽身。唯烧蒿棘��,愁坐夜待晨。
2023/10/21: 念彼深可愧,自问是何人
顾我当此日,草堂深掩门。褐裘覆絁被,坐卧有余温。幸免饥冻苦,又无垄亩勤。念彼深可愧,自问是何人。
◆ 二、救济人病裨补时阙(807—811)
2023/10/21: 正色强御,刚肠喔咿
正色摧强御,刚肠嫉喔咿。
2023/10/21: 启奏之外,有可以救济人病、裨补时阙、而难于指言者,辄咏歌之
“欲开壅蔽达人情,先向歌诗求讽刺”(《采诗官》),经过风云激荡的政治生活洗礼,白居易认识到“文章合为时而著,歌诗合为事而作”,因此“启奏之外,有可以救济人病、裨补时阙、而难于指言者,辄咏歌之”。
2023/10/21: 首句标其目,卒章显其志,《诗》三百之义也
为君、为臣、为民、为物、为事而作,不为文而作也
篇无定句,句无定字;系于意,不系于文。首句标其目,卒章显其志,《诗》三百之义也。其辞质而径,欲见之者易谕也;其言直而切,欲闻之者深诫也;其事核而实,使采之者传信也;其体顺而肆,可以播于乐章歌曲也。总而言之,为君、为臣、为民、为物、为事而作,不为文而作也。
◆ 杜陵叟
2023/10/22: 善政不能及民者多矣
《唐宋诗醇》评曰:“从古及今,善政不能及民者多矣。一结慨然思深,可为太息。”
2023/10/22: 绝大多数封建皇帝只顾与官吏唱双簧
皇帝降下德音,税早已收完,从中可见皇帝要减税,主要是为了笼络人心,装装样子,执行与否,执行到什么程度,他是不去管的。而地方官也明知这一点,利用其不闻不问、不检查督促,搞了一场骗局。这种“善政”真让人“慨然思深”。宋代诗人受白居易诗启发,写下了“自从乡官新上来,黄纸放尽白纸催”(范成大《后催租行》)、“一司日日下赈济,一司旦旦催租税”(米芾《催租》)、“淡黄竹纸说蠲逋,白纸仍科不稼租”(朱继芳《农桑》)等作,这说明绝大多数封建皇帝只顾与官吏唱双簧去“虐人害物”,连“善政”的美名也不要了。
◆ 井底引银瓶
2023/10/22: 两心之外无人知,彼此甘心无后期
白居易早年曾与邻女湘灵相恋,其《长相思》诗有云:“妾住洛桥北,君住洛桥南。十五即相识,今年二十三。”但这段缠绵的恋情最终却是分离的悲剧结局,《潜别离》诗言及分手的痛苦:“不得哭,潜别离。不得语,暗相思。两心之外无人知。深笼夜锁独栖鸟,利剑春断连理枝。河水虽浊有清日,乌头虽黑有白时。唯有潜离与暗别,彼此甘心无后期。”
◆ 轻肥
2023/10/23: 把他们的骄奢淫逸写足,好比射箭,要引满而发,“结语斗绝,有一落千丈之势”
全诗共十六句,用了十四句写宦官的长街走马,写军中宴会,层层铺垫渲染,把他们的骄奢淫逸写足,好比射箭,要引满而发,到了最大限度时才对准目标猛地射出一箭——“是岁江南旱,衢州人食人”,这一箭才特别有力
2023/10/23: 衢州人食人”的惨剧,正是这一小撮不顾人民死活的家伙掌握了军政大权的结果
一方面是花天酒地、骄奢淫逸,一方面是大旱饥荒、人吃人,这两种现象强烈而鲜明的对比是对宦官的尖锐抨击。这两种现象之间又有着深刻的内在联系:一小撮宦官糜烂发臭的生活,就是建筑在广大人民饥饿和死亡的基础上的;“是岁江南旱”两句前面放上“食饱心自若,酒酣气益振”两句,暗示了“衢州人食人”的惨剧,正是这一小撮不顾人民死活的家伙掌握了军政大权的结果。
◆ 三、中道左迁天涯沦落(811—820)
2023/10/24: 根情、苗言、华声、实义
对于诗的性质,他概括出“根情、苗言、华声、实义”四大要素。诗歌要以情感为基础,用形象的语言、和谐的韵律表现出来,内容必须具有充实的义理。否则,诗歌就失去了价值。
2023/10/24: 谓之讽谕诗,兼济之志也;谓之闲适诗,独善之义也
他将自己的诗歌分为四类:讽谕诗、闲适诗、感伤诗和杂律诗。《与元九书》云:“自拾遗以来,凡所遇所感,关于美刺兴比者,又自武德迄元和,因事立题,题为《新乐府》者,共一百五十首,谓之讽谕诗。又或退公独处,或移病闲居,知足保和,吟玩性情者一百首,谓之闲适诗。又有事物牵于外,情理动于内,随感遇而形于叹咏者一百首,谓之感伤诗。又有五言、七言、长句、绝句,自一百韵至两韵者四百余首,谓之杂律诗。”四类中他最看重的是讽谕诗和闲适诗,“谓之讽谕诗,兼济之志也;谓之闲适诗,独善之义也。故览仆诗,知仆之道焉”。因为这两类诗集中表现了他进退出处之道和平生志尚,也体现了他诗歌创作的指归,所以值得珍视。
◆ 欲与元八卜邻先有是赠
2023/10/24: 暂出犹思伴,安居须择邻
每因暂出犹思伴,岂得安居不择邻。
2023/10/24: 两岸人烟,一溪灯火
“两岸人烟分市色,一溪灯火共书声”(吴企晋)
◆ 蓝桥驿见元九诗
2023/10/24: 每到驿亭先下马,循墙绕柱觅君诗
蓝桥春雪君归日,秦岭秋风我去时。每到驿亭先下马,循墙绕柱觅君诗。
2023/10/24: 诗人内心正经受着贬谪的屈辱和愁苦的煎熬,急欲借遍觅故人之题咏来稍作安慰
三、四句则用“下马”、“循墙”、“绕柱”、“觅君诗”等四个细节动作,真实而准确地描绘出诗人寻觅、辨认友人诗作的动人情景,而这种寻觅又表明诗人内心正经受着贬谪的屈辱和愁苦的煎熬,急欲借遍觅故人之题咏来稍作安慰。出语看似平淡,表达的情意却极为深挚,这是白居易诗的独造之境。
2023/10/24: 此句他人尚不可闻,况仆心哉
元和十年,元稹正月入京,不料三月又复贬为通州司马,八月,在病危之中惊悉白居易贬江州,忧愤难禁,写下了充满深情的《闻乐天左降江州司马》诗:残灯无焰影幢幢,此夕闻君谪九江。垂死病中惊坐起,暗风吹雨入寒窗。全诗用残灯、阴影、暗风、秋雨、寒窗等景物,构成了一种凄惨孤独的意境,借以衬托诗人所处的环境和关切友人的挚情。白居易读到这首诗后,十分感动,在《与微之书》中说:“此句他人尚不可闻,况仆心哉!至今每吟,犹恻恻耳。”
◆ 放言五首并序(选一)
2023/10/24: 草萤有耀终非火,荷露虽团岂是珠
朝真暮伪何人辨,古往今来底事无?但爱臧生能诈圣,可知宁子解佯愚?草萤有耀终非火,荷露虽团岂是珠?不取燔柴兼照乘,可怜光彩亦何殊!
◆ 琵琶行并序
2023/10/24: 予出官二年,恬然自安,感斯人言,是夕始觉有迁谪意
遂命酒,使快弹数曲。曲罢悯然。自叙少小时欢乐事,今漂沦憔悴,转徙于江湖间。予出官二年,恬然自安,感斯人言,是夕始觉有迁谪意。
◆ 暮江吟
2023/10/24: 草风沙雨
建昌江水县门前,立马教人唤渡船。忽似往年归蔡渡,草风沙雨渭河边。
◆ 四、闲居泰适觞咏弦歌(820—846)
2023/10/24: 以当时心言异日苏、杭苟获一郡,足矣 敬宗宝历元年(825)三月,除苏州刺史,二年以病免郡事
元和十五年(820)正月宪宗暴卒,穆宗即位。夏初,白居易自忠州召还长安,除尚书司门员外郎;十二月,改授主客郎中、知制诰。穆宗长庆元年(821)十月,转中书舍人。长庆二年,河北藩镇复乱,居易多次上疏言事,但“天子荒纵,宰相才下,赏罚失所宜,坐视贼,无能为,居易虽进忠,不见听”(《新唐书》本传)。于是他请求外任。七月,除杭州刺史;十月,至杭州。白居易少年时慕苏州刺史韦应物、杭州刺史房孺复之风流才调,“以当时心言异日苏、杭苟获一郡,足矣”(《吴郡诗石记》)。因此,出牧杭州可谓了却当年心愿。杭州本江南大郡,当时已是形胜佳丽的繁华都市,居易在此留下了大量优美的诗篇。
2023/10/24: 为向两州邮吏道,莫辞来去递诗筒
长庆三年(823),元稹外放为浙东观察使,居易与其邻郡而治,“为向两州邮吏道,莫辞来去递诗筒”(《醉封诗筒寄微之》),从此两郡常以诗筒往来,两位文友诗歌唱和略无虚日。
2023/10/24: 元白 刘白
大和五年(831)七月,挚友元稹卒于武昌,此后,他主要是与刘禹锡为诗友,世称刘、白。
2023/10/24: 朝廷雇我作闲人
《唐宋诗醇》说白居易“洎大和、开成之后,时事日非,宦情愈淡,唯以醉吟为事,遂托于诗以自传焉”。他自长庆以来,虽仕途坦顺,已无意于趋竞,委顺思想得到突出的发展。他在《长庆二年七月自中书舍人出守杭州路次蓝溪作》诗中说自己“置怀齐宠辱,委顺随行止”,“因生江海兴,每羡沧浪水。尚拟拂衣行,况今兼禄仕”。以委顺行之于仕途,一个主要表现就是吏隐,“山林太寂寞,朝阙空喧烦。唯兹郡阁内,嚣静得中间”(《郡亭》)。以太子宾客分司东都时,他的感觉是“朝廷雇我作闲人”(《从同州刺史改授太子少傅分司》)。这时,白居易又进一步提出“中隐”思想。
2023/10/24: 似出复似处,非忙亦非闲。不劳心与力,又免饥与寒
大隐住朝市,小隐入丘樊。丘樊太冷落,朝市太嚣喧。不如作中隐,隐在留司官。似出复似处,非忙亦非闲。不劳心与力,又免饥与寒。终岁无公事,随月有俸钱。君若好登临,城南有秋山。君若爱游荡,城东有春园。君若欲一醉,时出赴宾筵。洛中多君子,可以恣欢言。君若欲高卧,但自深掩关。亦无车马客,造次到门前。人生处一世,其道难两全。贱即苦冻馁,贵则多忧患。唯此中隐士,致身吉且安。穷通与丰约,正在四者间。
◆ 勤政楼西老柳
2023/10/24: 半朽树,多情人。开元柳,长庆春
半朽临风树,多情立马人。开元一株柳,长庆二年春。
2023/10/24: 未堪摩霄汉,只合觅稻粱
其《初罢中书舍人》诗云:“性疏岂合承恩久?命薄元知济事难。”又《病中对病鹤》诗云:“未堪再举摩霄汉,只合相随觅稻粱。”
◆ 采莲曲
2023/10/24: 欲语低头笑
菱叶萦波荷飐风,荷花深处小船通。逢郎欲语低头笑,碧玉搔头落水中。
2023/10/24: 斜倚熏笼坐到明
泪湿罗巾梦不成,夜深前殿按歌声。红颜未老恩先断,斜倚熏笼坐到明。
2023/10/24: 秋霜手先知,灯底剪刀冷
寒月沉沉洞房静,珍珠帘外梧桐影。秋霜欲下手先知,灯底裁缝剪刀冷。
◆ 钱塘湖春行
2023/10/24: 松排山面,月点波心
湖上春来似画图,乱峰围绕水平铺。松排山面千重翠,月点波心一颗珠。碧毯线头抽早稻,青罗裙带展新蒲。未能抛得杭州去,一半勾留是此湖。
◆ 杭州春望
2023/10/24: 涛声夜入伍员庙,柳色春藏苏小家
望海楼明照曙霞,护江堤白踏晴沙。涛声夜入伍员庙,柳色春藏苏小家。红袖织绫夸柿蒂,青旗沽酒趁梨花。谁开湖寺西南路?草绿裙腰一道斜。
◆ 除苏州刺史别洛城东花
2023/10/24: 残暑蝉催尽,新秋雁带来
小宴追凉散,平桥步月回。笙歌归院落,灯火下楼台。残暑蝉催尽,新秋雁带来。将何迎睡兴?临卧举残杯。
2023/10/24: 卧迟灯灭后,睡美雨声中
凉冷三秋夜,安闲一老翁。卧迟灯灭后,睡美雨声中。灰宿温瓶火,香添暖被笼。晓晴寒未起,霜叶满阶红。
◆ 与梦得沽酒闲饮且约后期
2023/10/24: 贤豪虽殁精灵在,应共微之地下游
四海齐名白与刘,百年交分两绸缪。同贫同病退闲日,一死一生临老头。杯酒英雄君与操,文章微婉我知丘。贤豪虽殁精灵在,应共微之地下游。
2023/10/24: 不教才展休明代,为罚诗争造化功
杜甫说李白是“文章憎命达,魑魅喜人过”(《天末怀李白》),韩愈评价柳宗元云:“然子厚斥不久,穷不极,虽有出于人,其文学辞章必不能自力以致必传于后如今无疑也。虽使子厚得所愿,为将相于一时,以彼易此,孰得孰失,必有能辨之者。”(《柳子厚墓志铭》)白诗亦谓梦得:“不教才展休明代,为罚诗争造化功。”
◆ 览卢子蒙侍御旧诗多与微之唱和感今伤昔因赠子蒙题于卷后
2023/10/24: 平生定交取人窄,屈指相知唯五人。四人先去我在后,一枝蒲柳衰残身
晦叔坟荒草已陈,梦得墓湿土犹新。微之捐馆将一纪,杓直归丘二十春。城中虽有故第宅,庭芜园废生荆棘。箧中亦有旧书札,纸穿字蠹成灰尘。平生定交取人窄,屈指相知唯五人。四人先去我在后,一枝蒲柳衰残身。岂无晚岁新相识,相识面亲心不亲。人生莫羡苦长命,命长感旧多悲辛。
6 notes · View notes
vespasiane · 6 months
Text
All Creatures Great and Small, and some other series that look nice
This seems to be a nice series, it's about the numerous adventures of a countryside veterinarian practice in 1930s to 1940s Yorkshire, England.
Tumblr media
Scavengers Reign, 葬送のフリーレン, Pantheon Season 2, Loki Season 2, 岁月
Tumblr media
0 notes
vespasiane · 6 months
Text
To give the average people a look at what can be done with today’s cutting-edge technology
I think HP knows that not a ton of people are going to buy this thing just because of that price. That said HP has been very clear that part of the reason why the Specter Fold exists at all is because they want to give consumers, the average people, a look at what can be done with today's cutting-edge technology. So maybe you'll be able to forgive that extremely high price tag.
youtube
0 notes
vespasiane · 6 months
Text
夏燮、《中西纪事》、《明通鉴》
《中西纪事》全书二十四卷,记载鸦片战争前后至咸丰末年中外关系的史事。例如,对于英国侵略者用炮舰政策,打开中国大门,强行通商的经过,以及西方教士来华传教的始末等,记载甚为详细。特别可贵的是他搜集了抗击外国侵略而英勇牺牲的烈士事迹,列为《海疆殉难》一目,加以记录。《中西纪事》的编撰,采用纪事本末体裁,将中外关系的有关史事,分类记载,列成二十四个题目,每个题目为书一卷,按时间先后,叙明原委,眉目清楚,叙事详明。夏燮自叙编书的目的是抗御外国的侵略和不满清政府的腐败,因而怀着“蒿目增伤,裂眦怀愤”的心情,“搜辑邸钞文报,旁及新闻纸之可据者,录而存之”。但又考虑到清政府文字狱的余威,“窃怀挟书之惧”,因而署名“江上蹇叟”。书中贯串着强烈的爱国思想,揭露英、法、美、俄等国的侵略罪行,颂扬中国人民的英勇反抗精神,为我们研究中国近代史提供了宝贵资料。《中西纪事》初稿成于道光三十年,后经咸丰九年(公元1859年)的修改,定为十六卷。同治四年(公元1865年)今增订为本24卷。出版以后,因触犯了洋人,受到腐败的清政府的查禁,曾被毁版。到公元1871年,才又重新刊刻印行。
Tumblr media Tumblr media
《明通鉴》于同洽十二年(公元1873年)刻印于江西宜黄官署。光绪二十三年(公元1897年)。又由湖北官书局重校刊行。夏燮在宜黄县任内,历年亏空,多达几万金。此事被江西藩司刘秉璋查觉,历次交代不清。光绪元年(公元1875年),夏燮在贫病忧愤中去世。夏燮死后,官府逼还欠款,其家人只好将夏燮的藏书出售偿债,但杯水车薪,无济于事。刘秉璋曾派人告诉夏家,如果愿将《明通鉴》木版归官书局,可折价一万五千金。由于夏家不肯,于是刘秉璋便报请江西巡抚刘坤一,将夏燮参奏革职、查抄、监追。至光绪七年,欠款尚未还清,其子也遭受连累。江西巡抚李文敏参奏他“顽抗不缴,实属延玩”。上谕将在外省任职的其子暂行革职,由吴元炳委员押解到江西,勒逼追缴。夏燮所刻的书版,被没入江西官库。光绪九、十年间,两江总督左宗棠,鉴于夏燮是当时的著名学者,奏请朝廷将他列入儒林传。这时刘秉璋已调升浙江巡抚,见到左宗棠的奏稿后,便旧事重提,将夏燮亏欠公款原案同时上奏。并说:“岂有亏空公款数万金,而可称为儒林者?”因而撤销左宗棠原奏。
0 notes
vespasiane · 6 months
Text
Resourcefulness and automation
You may notice that on every high performing team they have one or two developers who are the go to guys, the ones who get stuff done, who figure it out, who are responsible for the biggest, most challenging features and the most critical and damaging bugs. I know when I worked at Microsoft, the top senior developers were really running the team, and that's because they were resourceful. They knew how to fix every single problem, not because they've done it before, but because they knew how to find the solution. They went to StackOverflow, they went to Google, they read documentation, they consulted with their teammates, and now in this age, they're using chat GPT. You need to be a developer who goes out of your way to figure out problems, find solutions, and not just cry when you can't figure it out immediately. You need to use the resources available to you and use them as effectively as possible. Now, one of the easiest ways to be resourceful today is to know how to use A.I. tools like chat GBT, specifically to know what they're good at, how to prompt properly, and when to be cautious of the responses it's giving you.
The next skill you need to master is scripting and automation. Now, this can be in any language or technology that you want, but having the ability to work with the file system, quickly understand how you can write a simple script that doesn't need to be the cleanest code in the world that can automate a quick task, that can save developers even ten to seconds every time they open the code base, is a massive skill. I remember one of the best developers I ever worked with was really a master at scripting. Any time there was a task that was going to take more than, say, five, 10 minutes manually, he'd just whip up a quick script for it and he'd save myself and him a ton of time. Any time I had a pretty monotonous kind of repetitive issue, I'd just message him. He'd whip up a script, and it really made me realize how powerful that skill is. And it's been something I've been working on more and more. So trust me, understanding how to script quickly, being comfortable in a language like Python, Bash scripting, even something like Node.js is really, really powerful. It will make you stand out and most of all, it's going to save you a ton of time.
youtube
0 notes
vespasiane · 6 months
Text
"she couldn’t stop saying thank you. she knows real value and appreciation"
0 notes
vespasiane · 6 months
Text
Try and except blocks: group, as, .errno
When errors are of a similar nature and there's no need to handle them individually, you can group the exceptions together as one by using parentheses in the except line. For example, if the navigation system is under heavy loads and the file system becomes too busy, it makes sense to catch BlockingIOError and TimeOutError together:
def main(): · · · · try: · · · · · · · · configuration = open('config.txt') · · · · except FileNotFoundError: · · · · · · · · print("Couldn't find the config.txt file!") · · · · except IsADirectoryError: · · · · · · · · print("Found config.txt but it is a directory, couldn't read it") · · · · except (BlockingIOError, TimeoutError): · · · · · · · · print("Filesystem under heavy load, can't complete reading configuration file")
If you need to access the error that’s associated with the exception, you must update the except line to include the as keyword. This technique is handy if an exception is too generic and the error message can be useful:
try: · · · · open("mars.jpg") except FileNotFoundError as err: · · · · print("Got a problem trying to read the file:", err)
Got a problem trying to read the file: [Errno 2] No such file or directory: 'mars.jpg'
If you’re catching a more generic OSError exception, which is the parent exception of both FilenotFoundError and PermissionError, you can tell them apart by the .errno attribute:
try: · · · · open("config.txt") except OSError as err: · · · · if err.errno == 2: · · · · · · · · print("Couldn't find the config.txt file!") · · · · elif err.errno == 13: · · · · · · · · print("Found config.txt but couldn't read it")
0 notes