Posts

Showing posts from 2023

两款超级方便的python环境:Google Colab和Spyder

Image
Google Colab和Spyder是两种最傻瓜,最方便的使用python的方法。一键部署,即插即用。 Google Colab and Spyder are two of the simplest and most convenient methods for using Python.  1. Google Colab Google Colab是一个可以运行python的在线服务。 Google Colab is an online service that allows you to run Python.  点击 https://colab.research.google.com/ ,跳转到Google Colab的欢迎页面,它会自动打开Open notebook窗口。点击左下角的"New notebook"。 To use it, visit Google Colab's homepage  https://colab.research.google.com/  . This will automatically open the 'Open notebook' window. Click the "New notebook" button on the left-bottom. 如果Open notebook窗口没有自动打开,点击左上角菜单栏的File-New notebook。 If this window doesn't appear, you can create a new notebook by clicking 'File' and then 'New notebook' from the top left menu.  这样就已经可以开始编程了。在光标闪烁处键入python程序,之后点击上方黑色三角形运行此程序。 Once you're set up, you can start programming right away. Just type your Python code where the cursor blinks, and execute the program by clicking the black tria...

油管up主推荐:小岛大浪吹 & 谈谈为什么要了解观点不同的人的想法 - Youtuber Recommendation: Xiaodaodalang & Why Be Aware of Opposing Political Views Matters

小岛大浪吹是一位聊政治和经济的油管up主,他的风格比较鲜明,就是“理性爱国”(这里所说的爱国指的是爱共产党以及中国政府)。 我认为他属于“高端粉红”,他做的所有视频都资料翔实,准备充足。他讲事情喜欢梳理逻辑,引用数据,查找资料。他还很爱国,视频里面但凡提到了中国的一些成就,他会由衷地感到高兴。此外,我喜欢他视频的语速与语气,和“要么不做,做就做好”的态度。 但岛哥不喜欢民主,或者说,他认为民众朝三暮四,做不出很好的决定。我相信他支持开明独裁。 虽然在这里我称呼他为岛哥,但是似乎我们两位的年纪相差还挺多的。 此外,岛哥绝对属于“有趣的灵魂”,他分析问题有自己的洞见,他的玩笑总能击中我的笑点(比如他说自己是油管第一大反指)。 这里推荐几个我认为他做的比较有特色的视频: https://www.youtube.com/watch?v=PruqQnQYPZQ   《年轻人是否还继续支持共产党》 他虽然爱国,但他并不忌讳中国的缺点。并且他可以分析出为什么有些年轻人可能不爱国。在本视频中他引用了大量的数据来分析中国的经济。 https://www.youtube.com/watch?v=kqPxgv_oOSo 《中国为什么又开始打击医疗腐败了,这么多年来医疗到底改革了什么》 他梳理了中国从建国以来的所有医疗制度。他不喜欢简单评价中国的现象,看到一个事情就说“共产党完了”或者“习近平不行”,相反,他从更深层的角度去分析中国的各个改革背后的逻辑,而且分析的还算有理有据。 https://www.youtube.com/watch?v=jCOdTC_JH1Y 《新加坡医院也歧视中国人?到底应该如何应对歧视》 他详细介绍了新加坡医院是否会有歧视中国人的现象,逻辑自洽,比无脑宣扬“整个世界都仇视中国”的低端小粉红高到不知道哪里去了。 https://www.youtube.com/watch?v=ADp3WmFtyFA 《终章:江泽民, 是如何改变中国的》 他又是大量查找资料,梳理长者一生的事迹,很难有人能把长者讲的这么细的,这些搜寻资料的丰富程度简直可以支持一篇研究江泽民的论文了。此外,我认为,一个人只有了解长者一生所有的事件,才有资格评价他。 另,+1s。 http...

制作咖喱牛肉 - Making curry beef

Image
咖喱牛肉几乎是最简单的一道大菜了,而且它做不坏,即怎么做都不难吃。 Curry beef is perhaps the simplest main dish to make, and it's pretty much foolproof - it's hard to mess up. 首先,将牛肉切成小块,放入锅中,加水煮沸,焯掉血水。 First, cut the beef into small pieces and boil them in water to remove the blood. 将胡萝卜,土豆,洋葱切成小块,将牛肉捞出。另起一锅热水,加入牛肉,胡萝卜,土豆,和咖喱块,图中的这些牛肉大约需要3-4块咖喱,之后加一点盐,一点油。 Next, chop carrots, potatoes, and onions into small pieces and take the beef out of the water. Start another pot with hot water, add the beef, carrots, potatoes, and curry blocks. For the amount of beef shown in the picture, you'll need about 3-4 curry blocks. Then, add a bit of salt and oil. 盖上锅盖,炖40分钟。 Cover the pot and stew for 40 minutes. 等到土豆和胡萝卜变得绵软后,加入洋葱,再炖20分钟。依据个人口味可以适当再加一点盐。咖喱牛肉就炖好了。 Once the potatoes and carrots are soft, add the onions and stew for another 20 minutes. You can adjust the seasoning with a little more salt to taste. And there you have it, your curry beef is ready.

如何使用python中的量子化学软件包(包括psi4和pyscf) - How to use quantum chemistry software packages in Python (including psi4 and pyscf)

虽说现有的量子化学软件如gaussian,orca,和gamess的功能非常强大,但有时为了方便,或者为了加深理解,也可以用python来做简单的量子化学计算。 While current quantum chemistry software like Gaussian, Orca, and GAMESS are incredibly robust, there are times when using Python for simple quantum chemistry calculations is more convenient or helps deepen our understanding. python中的量子化学软件包有以下几个: The following quantum chemistry software packages are available in Python: psi4 pyscf PyQuante(因为年代过于久远而安装失败  failed to install due to its age ) 此外,还有几个类似的量子计算包,但不能做单分子量子化学计算,在本文中暂不考虑: Additionally, there are several similar quantum computing packages that can't perform single-molecule quantum chemistry calculations, which are not considered in this article: QuTiP(用于量子物理 used in quantum physics) Quantum ESPRESSO(用于固体物理 used in solid-state physics) 本文将介绍如何使用psi4和pyscf。出于方便,本文将使用google colab安装并使用所有的软件包。 This article focuses on how to utilize psi4 and pyscf. For ease of use, all software packages will be installed and employed using Google Col...

制作蛋炒饭 - Making egg fried rice

Image
首先,蒸些米饭,放凉备用。 First, steam some rice and let it cool for later use. 将胡萝卜,黄瓜,虾仁切成小块,并准备适量玉米粒,青豆。将以上材料煮熟备用。火腿肠切成小块备用。切一点葱花。 Dice carrots, cucumbers, and shrimp into small pieces, and prepare a suitable amount of corn kernels and green peas. Cook all these ingredients and set them aside. Also, cut sausage into small pieces and set aside. Chop a little green onion. 用一个大盆,打几个鸡蛋,搅散。鸡蛋的数量大约是人数的2倍。加入适当的黑胡椒,盐,和十三香。加入放凉的米饭,拌匀。 Crack several eggs into a large bowl, and beat them. The number of eggs used is approximately twice the number of people. Add appropriate amounts of black pepper, salt, and thirteen-spice powder. Mix in the cooled rice until well combined. 烧热炒锅,加入油,把裹上蛋液的米饭和菜,倒入锅中翻炒,加一点葱花。等到感觉米饭不粘了之后,加入一点酱油。蛋炒饭就做好了。 Heat a frying pan, add oil, and pour in the rice mixed with egg and all the vegetables, add the green onion. Stir-fry until the rice no longer sticks together. Then, add a bit of soy sauce. The egg fried rice is now ready.

制作印度混合香料茶 - Making Masala Chai

Image
 印度香料茶的味道非常的有地域特色,不过喜欢的人确实会非常喜欢。 The flavor of masala chai is very distinctive and region-specific, but those who like it really enjoy it. 首先,准备以下几种香料(依据图片顺序从左至右):桂皮,丁香,八角,肉豆蔻,各取一点,掰碎或切碎,装到茶包袋里,如下图所示。 First, prepare the following spices (from left to right according to the picture): cinnamon, clove, star anise, and nutmeg. Take a small amount of each, break or chop them into pieces, and place them in a tea bag as shown in the picture below. 不一定要求备齐所有香料,可以缺一两样。 It's not necessary to have all the spices; you can omit one or two. 然后,切少量姜,装在茶包袋里,姜的用量要多于混合香料的用量。 Next, chop a small amount of ginger and put it in a tea bag. The quantity of ginger should be more than that of the mixed spices. 再准备一些红茶茶叶,装在另一个茶包袋里。因为茶的味道比香料的味道轻,所以茶叶的用量要多于以上所有调味料的用量。 Prepare some black tea leaves and put them in another tea bag. Since the flavor of the tea is milder than the spices, use more tea leaves than all the other seasonings combined. 将水烧开,将以上三个茶包放进开水里煮。10分钟后,取出香料包和姜包,再煮20分钟,等待茶汤的颜色变成深红色。 Boil water an...

计算lammps模拟系统的密度 - Calculate the density of a lammps simulated system

想要计算lammps模拟系统的密度,需要知道系统的尺寸,和系统内的原子数。 To calculate the density of a lammps simulated system, you need to know the system's dimensions and the number of atoms within it. 对于尺寸在模拟中不发生变化的系统,可以读取其输入文件的结构文件来获得系统的三维尺寸。以下为一个典型的结构文件的例子: For systems whose dimensions do not change during simulation, you can obtain the three-dimensional size of the system by reading the structure file in its input file. Here's an example of a typical structure file: ``` LAMMPS data file 3072 atoms 2 atom types 2048 bonds 1 bond types 1024 angles 1 angle types -1.2631399999999999e+01 1.2631399999999999e+01 xlo xhi -1.2631399999999999e+01 1.2631399999999999e+01 ylo yhi -2.5262750000000000e+01 2.5262750000000000e+01 zlo zhi Masses 1 1.008 2 15.9994 ``` 最长的那三行是盒子的尺寸。x方向的尺寸为12.6314-(-12.6314)=25.2628A。y和z方向的尺寸计算方法类似。 The three longest lines represent the dimensions of the box. The size in the x-direction is 12.6314 - (-12.6314) = 25.2628 Å. The size in the y and z directions is calculated similarl...

对普通女权,田园女权,与激进女权的粗浅探讨

Image
前言 普通女权,田园女权,激进女权是中国最常见的三种女权形式。在这里我对这三种女权做一个简单的定义: 普通女权试图推翻父权制,追求男女平等;田园女权追求女性特权;激进女权主张性别分离。 一些共识 不要与低水平的人缠斗,有些人,你看一眼Ta说的话就应该觉得没有和Ta讨论的必要。 目前这个世界仍然处在父权体系下,它是保守,死板,不公平的,给予一部分男人更多权利和资源。 [1] 大部分男性和大部分女性都是父权制的受害者,但一些男性在受害的同时也获得了一些益处。 男性也可能是父权制的受害者。考虑一个住在穷山村,因为没钱,找不到老婆(新生儿男女性别失衡,以及天价彩礼),而被周围邻居指指点点的大龄青年。他不能出村生活,因为他家里人和村里人要他继承土地,以及给父母养老。 中国的女权运动,和其他的人权运动内容并无不同,本质上是少数既得利益者和多数被剥削压迫者的冲突。 [2] 虽然女权思潮从外国开始并流传到中国,但大多数人是发自内心支持女权的。中国的女权运动并不一定有境外势力的参与。 这世界上是有正义的人的,男性支持女权不一定是为了骗炮。 普通女权 我定义下的普通女权包括自由女权,后现代主义女权,和一部分的社会主义女权。 普通女权追求的是男女平等,即“平权”,其反对的不是“男性”,而是导致男女不平等的父权制度。在这个制度下,男人垄断了大多数的资源,而女人由于其性别遭受了大大小小的歧视。[1] 普通女权反对消费主义陷阱和身体羞辱。 普通女权认为:女性是一种社会文化建构出来的产物。而所谓“女性特质”,是受到阶级、民族、宗教、教育等因素影响而形成的。在不同的社会和历史阶段,对女性气质/男子气概的理解不同。(比如法国皇帝会戴假发,穿丝袜,高跟鞋,以彰显自己的男子气概)[1] 普通女权提出的口号包括“同工同酬”,“妇女能顶半边天”。 田园女权 田园女权是中国特色的女权,是新旧思想混合的产物。“要男人做事供给一切,完全是19世纪的想法;但是,又要男女平等,现代女性的权利又要齐全。”它虽然多由女性主张、对现代女性的权利寸步不让,但其基底却是男权的,也只有在一个男权社会才行得通。 [3] 比如,在欧美这种不那么男权的社会中,如果女性提出“你负责赚钱养家,我负责貌美如花”,一个欧美男性可能会奇怪为什么会有人可以不“赚钱养家”。 一些田园女权也会说支持“平权”,Ta们会为自己遇到的不公抗争,但不一定意识...

《共产党宣言》读后感 - Reflections on "The Communist Manifesto"

Image
由于本文可能稍有敏感,这里仅展示英文版。 Foreword My younger brother was tasked by his school to write a 3,000-word reflection on "The Communist Manifesto," and he asked for my help. Embarrassingly, I hadn't read the Manifesto myself, so I took this as an opportunity to dive in. I read this version: https://www.marxists.org/chinese/marx/01.htm Image Source Significance First and foremost, "The Communist Manifesto" played a pivotal role in organizing labor struggles. It defined the proletariat, organized unions, united workers, and led the proletariat in resisting capitalist oppression, most importantly, making capitalist countries reconsider their need to demonstrate their superiority. As Che Guevara once said, "After we're gone, they'll build schools and hospitals for you, raise your wages, not because they've had a change of heart or become kind, but because we were here." The struggle of the lower and middle classes is an eternal theme of human civilizatio...

使用python的scipy包做非线性回归 - Performing Nonlinear Regression Using Python's Scipy Package

Image
可以使用python的scipy.optimize包的curve_fit来进行非线性回归。 Nonlinear regression can be conducted using the curve_fit function from Python's scipy.optimize package. 这其中最重要的是,需要定义一个函数充当要回归的方程。这里以Langmuir吸附方程举例 Crucially, you need to define a function that represents the equation to be regressed. For example, consider the Langmuir adsorption equation: y=max*kc/(1+kc) 这个方程有2个参数:k和max。将其转化为python格式,如下所示: This equation has two parameters: k and max. Transformed into Python format, it appears as follows: ``` def func(x, k, max): return max * k * x / (1 + k * x) ``` 输入需要用于拟合的xdata和ydata,然后使用curve_fit函数拟合。xdata和ydata需为np.array格式。 Input the xdata and ydata to be used for fitting, then use the curve_fit function for fitting. Both xdata and ydata should be in the np.array format. ```popt, pcov = curve_fit(f=func, xdata=xdata, ydata=ydata) ``` 如果需要指定参数的初始猜测值的话,需在curve_fit指定p0参数,p0的长度需与参数个数相同。 If you want to specify initial guesses for the parameters, use the p0 parameter in curve_fit. The len...

诗 - 想你

想你 想你…… 我想你…… 我想和你…… 我想和你跳进湖水里面 像鱼一样绕着朦胧的山巡游 浓雾模糊了水天交接的地方 我们就从那里滑进今晚的夜空 把云彩捏成一个绒球 就可以将一颗星星埋在里面 从天河中捧一汪水 一挥手,扬了满天的流星雨 从鹊桥上轻轻的跳下来,我们手拉着手 伴着流星雨,落到一个陌生的城市 明明说好了要在这里玩到通宵 但不知不觉中吃多了宵夜,困意上来了 没事,那就找个没人的小岛睡一觉吧 我们的催眠曲已经哗啦哗啦地自己唱起来了 揭一片海浪盖在身上 对岸的灯,一盏一盏地灭掉 嗡嗡声从你的梦里传来 哦,原来你梦到了风车在转啊转 我们一起使劲对着它吹气 嚯,最后它转的像陀螺那么快 日出了,世界慢慢盛开 海水褪去,森林长了出来 趁你还在睡觉,我该走了 等等,我突然看到一个耀眼的: 那是一束穿过了一百片树叶的阳光 打在你的额头上,比太阳还灿烂 捡起来,装在盒子里面,摆在你的手边 悄悄地,送给你 想送给你…… 想送你…… 想你…… 2023.10.31

改良主义宣言:防止中国变成西朝鲜 - Manifesto for Reformism: Preventing China from Becoming the "West Korea"

由于本文可能稍有敏感,这里仅展示英文版。 Preface Before leaving office, Wen Jiabao stated: "We must not only advance economic system reform but also political system reform. Without the guarantee of political system reform, the achievements of economic system reform may be lost, and the goals of modernization cannot be realized." Before leaving office, Li Keqiang said: "The Yangtze and Yellow Rivers will not flow backward, and China's opening-up will not change." I believe Li Keqiang's statement is more of a warning than a guarantee: the Chinese nation is at a perilous moment. China is now at a crossroads, facing the choice between continuing reform and opening up and modernization, or regressing to a closed and conservative mode like North Korea. It's crucial for us to stand up and guide China towards the right direction. Some Preliminary Theories Without oversight, there's no reason for leaders to ensure the nation's progress. If maintaining a North Korea-like sta...

中华文化的优缺点 - Pros and Cons of Chinese culture

我想讨论中华文化的优缺点,但这个话题实在是太大了,而且特别引战。本文仅仅列举我本人的不成熟的看法,如果读者认为我说了什么不合理,或者过分的言论,请直接留言与我讨论,或者要求我删除。 I'd like to discuss the pros and cons of Chinese culture, but this topic is vast and can be controversial. The views presented here are purely my own opinions. If you find any statements unreasonable or excessive, please leave a comment for discussion or request its removal. 套一个盾:这里所说的中华文化的优缺点,并不是指每个中国人都有这些优缺点,这里仅指平均而言的优缺点,找出一个并不勤劳肯干的中国人非常容易(比如我)。 Clarification: The attributes mentioned regarding Chinese culture don't apply to every individual. It's an average observation. For instance, not every Chinese person is diligent (like myself). 再套一个盾:我这里列出的优缺点并不是与其他文化比较,而是只列举我认为一些比较大,阻碍发展的问题,比如其实我认为这个世界上所有的文化都有点缺乏科学精神。 Further Note: The strengths and weaknesses I list aren't in comparison to other cultures but are major points I believe hinder development. For example, I think all cultures might somewhat lack a scientific spirit. 中华文化的优点: 勤劳肯干 吃苦耐劳,可以容忍更差的环境 遵纪守法,严于律己 重视教育,渴望阶级跃升...

制作红枣银耳莲子羹 - Making Red Dates, White Fungus and Lotus Seed Soup

Image
红枣银耳莲子羹是一道非常简单的小甜点,其做法如下所示。 The Red Dates, White Fungus and Lotus Seed Soup is an incredibly simple dessert, with the instructions demonstrated as below. 首先,烧开水,调小火,放入洗净的莲子,煮15分钟。 Firstly, boil water, then turn the heat down and add the washed lotus seeds. Simmer it for 15 minutes. 在此期间,将少量银耳泡发,摘掉根部。红枣切开,去核。待莲子煮好后放入桂圆,枸杞,和处理好的银耳和红枣。继续煮30分钟。 During this time, soak a small amount of white fungus and removed the roots. Cut the red dates open and remove the seeds. After the lotus seeds are cooked, add longan, goji berries, and the prepared white fungus and red dates. Continue to simmer for 30 minutes. 出锅前依据个人口味适当添加冰糖,或白砂糖。成品如下所示: Before serving, add some rock sugar or white sugar according to personal taste preference. The final product is shown as below:

元键政3:与低水平言论缠斗意义不大 - Meta Political Discussion 3: It's insignificant to engage in a battle of words with low-level arguments

Image
由于本文可能稍有敏感,这里仅展示英文版。 Sometimes when I go to websites like Douyin, Kuaishou, Twitter, Sohu News, Baijia, and Hupu (They are all common applications/bbses in China) and search for political terms in Chinese, I am overwhelmed by the prevalent nationalism, hate speech, gender conflict, stereotypes, and unverified gossip and salacious news, often accompanied by vulgar images. It sometimes disheartens me so much that I have a feeling that "Chinese people are really unchangeable." However, my feelings are misguided. I should not engage or even associate myself with these users or their comments. If we are to contribute to building a civil society, then we must prioritize maintaining the quality of our own platforms or communities, over anything else. Excessive exposure to bad-quality discourse may cause a dismissive & biased view of our fellow citizens.  Constant exposure to negative and low-level discourse comes with a major risk: our tendency...

热门博文 - Popular posts