duangsuse::Echo
https://drive.google.com/file/d/1rcltzfdu4_BVB40i1s7cKNOD9rCIJyow/view #Moha #Haha #bear 因为我那时候,扛两百斤麦子,十里山路不换肩的。 溅得我满脸喷粪啊,满脸是粪。 一天游泳一千米。 有些吃饱了没事干的外国人,对我们的事情指手画脚。中国一不输出革命,二不输出饥饿和贫困,三不去折腾你们,还有什么好说的。 PM250。 地委那些人见我,“最近咧嘴了吧?”,我说“咧了”,咧了就好,以后吃一堑长一智,今后经验就多了,不要老侥…
『两百斤麦子,十里山路不换肩』
『满脸喷粪啊,满脸是粪』
『一天游泳一千米』
『中国人均国内生产总值接近八千万美元』
『中国一不输出革命,二不输出饥饿和贫困,三不去折腾你们,还有什么好说的』
『PM二百五』
『最近咧嘴了吧?吃一堑长一智,今后经验就多了,不要老侥幸,运气好不出事,哪一天你出了事那就倒大霉』
『那些错误执行者,他也是有一本账的,这个账是记在那儿的。一旦他出事了,这个账全给你拉出来了。别看你今天闹得欢,小心今后拉清单,这都得应验的。不要干这种事情。头上三尺有神明,一定要有敬畏之心。』
『我急得像热锅上的蚂蚁』
『做到12点,就不做了睡大觉,第二天重新来过』
『基础不牢,地动山摇』
『鲜(xiǎn)克有终』
『轻关易道,通商宽衣(yī)』
『岿(kuī)然不动』
『萨格尔王』
『“精甚细腻”的工笔画』
『不以追求贸易逆差为目标』
『狂风骤雨可以掀翻小池塘,但不能掀翻大海』
『不同意的请举手…没有、没有、没有!』
『金科律玉的教科书、颐使气指的教师爷』
『天行健,君子以不强自自强不息』
『波(pō)涛汹涌』
『我亲自指挥、亲自部署』
『现在防疫还不能麻痹(pì)大意』
『满脸喷粪啊,满脸是粪』
『一天游泳一千米』
『中国人均国内生产总值接近八千万美元』
『中国一不输出革命,二不输出饥饿和贫困,三不去折腾你们,还有什么好说的』
『PM二百五』
『最近咧嘴了吧?吃一堑长一智,今后经验就多了,不要老侥幸,运气好不出事,哪一天你出了事那就倒大霉』
『那些错误执行者,他也是有一本账的,这个账是记在那儿的。一旦他出事了,这个账全给你拉出来了。别看你今天闹得欢,小心今后拉清单,这都得应验的。不要干这种事情。头上三尺有神明,一定要有敬畏之心。』
『我急得像热锅上的蚂蚁』
『做到12点,就不做了睡大觉,第二天重新来过』
『基础不牢,地动山摇』
『鲜(xiǎn)克有终』
『轻关易道,通商宽衣(yī)』
『岿(kuī)然不动』
『萨格尔王』
『“精甚细腻”的工笔画』
『不以追求贸易逆差为目标』
『狂风骤雨可以掀翻小池塘,但不能掀翻大海』
『不同意的请举手…没有、没有、没有!』
『金科律玉的教科书、颐使气指的教师爷』
『天行健,君子以不强自自强不息』
『波(pō)涛汹涌』
『我亲自指挥、亲自部署』
『现在防疫还不能麻痹(pì)大意』
找了半天, GNU 的 cat, tac, tee, nl, od, fmt, pr, ptx, tsort, cut, split, join 等工具都不能用于『输入两个同样长度的文件,然后以指定 sep 切分它们的同号行来输出』 #linux #sysadmin 还是自己用
awk -e 'BEGIN { print }' 草
man awk 发现它又有好多功能,不仅引入了 @namespace 和 @include,连 IEEE-754 都可以指定 rounding algorithm 还能干 multi-dimensional arrays,不愧是 UNIX 系软件,事无巨细啥都能管n_line = 0; BEGIN { while (getline ln) { print ln; n_line++ } } END { print n_line } 🤔这样。
awk -e 'n_line = 0; lines; BEGIN { while (getline ln) { lines[n_line] = ln; n_line++ } } END { d=n_line/2; for (i=0;i<d;i++) { print lines[i] " " lines[i+d] } }' 🌚 好吧,也算是能用虽然 lines[0] 永远没被赋值,可是我为什么不去干脆去用 Node 甚至 Python 甚至 PHP 呢?
process.stdin.addListener("data", console.log) 草这个要换成 line buffering 太不友好 🌚 data stop error 监听么#Python 就很简单了。 (屑 AWK 还不如用 Perl (我刚才还在
[input() for _ in range(233)] 来着text = list(iter(input, '.'))
mid = len(text) // 2
"\n".join(map(lambda p: f"{p[0]} {p[1]}", zip(text[:mid], text[mid:]) ))🤔 其实 a*b = c 还是一个很常见的逻辑, 3-address , a b (src) c (dst)
而且
所以, c*b + m = a
莫名其妙想到这个……
SED 好像不能用来做有 captue 和 substitute template 的 regex 替换
还好 AWK 可以:
啊不对,是这个:
而且
divmod 给定 a, b 可以求出 c, m所以, c*b + m = a
"$a == ($b*$c)+$m" Map<K, V> 就像是一种可以自定义关系的函数一样,加法利用“currying” 构造出 (+1) 这样的东西,就可以利用多层嵌套映射 inc[inc[x]] 来做到 (+2) 了莫名其妙想到这个……
SED 好像不能用来做有 captue 和 substitute template 的 regex 替换
sed 's/『(.*)』/$1/g' 而且反斜杠直接 “s”命令的RHS非法引用\1 ……还好 AWK 可以:
awk -e '/『(.*)』/ { print $1 }' 啊不对,是这个:
awk -e '{ print gensub(/『(.*)』/, "\\1", "G") }'def mergeSplited(lines = lambda: list(iter(input, '.')), vsep="\n", hsep=" "):
text = lines(); mid = len(text) // 2
return vsep.join(map(lambda p: f"{p[0]}{hsep}{p[1]}", zip(text[:mid], text[mid:]) )) fun List<String>.mergeSplited(seprator: String = "\n", format: (Pair<String, String>) -> String = {"${it.first} ${it.second}"}): String {
require(size % 2 == 0) {"paired list required"}
val mid = size / 2
return subList(0, mid).zip(subList(mid, size)).joinToString(seprator, transform = format)
} //"imperative" one #Kotlin #Python #code
fun List<String>.mergeSplited(seprator: String = "\n", format: (Pair<String, String>) -> String = {"${it.first} {it.second}"}): String {
val mid = size / 2
return (0 until mid).joinToString { i -> format(this[i] to this[mid+i]) }
}#English #Haha #China #bear 英语学习 😃🐻
两百斤麦子,十里山路不换肩 Two hundred catties of wheat, ten kilometers of mountain road without changing shoulder
满脸喷粪啊,满脸是粪 Spraying dung all over the face, all over the face is dung
一天游泳一千米 Swim one thousand meters a day
PM二百五 PM two hundred and fifty
中国人均国内生产总值接近八千万美元 China's GDP per capita is close to 80 million US dollars
不以追求贸易逆差为目标 Do not aim to pursue a trade deficit
中国一不输出革命,二不输出饥饿和贫困,三不去折腾你们,还有什么好说的 First, China does not export revolution, second does not export hunger and poverty, and third does not toss you, what is there to say?
那些错误执行者,他也是有一本账的,这个账是记在那儿的。一旦他出事了,这个账全给你拉出来了。别看你今天闹得欢,小心今后拉清单,这都得应验的。不要干这种事情。头上三尺有神明,一定要有敬畏之心。 Those erroneous executors, they also has an record. Once they have an accident, the record will be pulled out for you. Don't look at your troubles today, those executors will be fear for being checked in the future, this will be fulfilled. Don't do this kind of thing. There are gods three feet above the head, and there must awe
我急得像热锅上的蚂蚁 I'm anxious like an ant on a hot pot!
最近咧嘴了吧?吃一堑长一智,今后经验就多了,不要老侥幸,运气好不出事,哪一天你出了事那就倒大霉 Have you feel difficult recently? Eat bitter and grow wiser, you will have more experience in the future, do not believe in luck, luck will not always happen, if you encounter problems, it will be too bad
做到12点,就不做了睡大觉,第二天重新来过 If it haven't been finished at 12 o'clock, just give up and go sleep, and redo it the next day
基础不牢,地动山摇 If the foundation is not strong, the ground moves
轻关易道,通商宽衣(yī) Easy to pass, easy to trade, widen clothing
鲜(xiǎn)克有终 Xianke has the end
岿(kuī)然不动,直到付出生命 Doesn't move anymore, like Kui, until lose his life
厚德载(zǎi)物 Houde Slaughters
提(tí)防 Hoof defense
发酵(xiào) Laugh out
乒(bīng)乓(bàn)外交 Icy diplomacy
波(pō)涛汹涌 Slope waves tumultuous
萨格尔王 King Sagar
“精甚细腻”的工笔画 Fine shen also delicate paintings
“金科律玉”的教科书、“颐使气指”的教师爷 Golden Kelly's textbooks, Yishi Qizhi's teacher god
大海有风平浪静之时,也有疯狂宇宙之时,狂风骤雨可以掀翻小池塘,但不能掀翻大海 When the sea is calm and calm, or when there is a crazy universe, the storm can overturn the small pond, but not the sea
不同意的请举手…没有、没有、没有! Raise your hand if you don't agree... Nobody, None, None!
天行健,君子以不强自自强不息 As nature's movement is ever vigorous, gentleman insists on self-improvement or self-killing
不仅在于找准了合作之道,关键是在于找准了合作之道 Problem is not only to find the way of cooperation, but also the key is to find the way of cooperation
我亲自指挥、亲自部署 I personally direct, personally deploy
现在防疫还不能麻痹(pì)大意 Now the epidemic prevention should not make pi paralyzed and become careless
两百斤麦子,十里山路不换肩 Two hundred catties of wheat, ten kilometers of mountain road without changing shoulder
满脸喷粪啊,满脸是粪 Spraying dung all over the face, all over the face is dung
一天游泳一千米 Swim one thousand meters a day
PM二百五 PM two hundred and fifty
中国人均国内生产总值接近八千万美元 China's GDP per capita is close to 80 million US dollars
不以追求贸易逆差为目标 Do not aim to pursue a trade deficit
中国一不输出革命,二不输出饥饿和贫困,三不去折腾你们,还有什么好说的 First, China does not export revolution, second does not export hunger and poverty, and third does not toss you, what is there to say?
那些错误执行者,他也是有一本账的,这个账是记在那儿的。一旦他出事了,这个账全给你拉出来了。别看你今天闹得欢,小心今后拉清单,这都得应验的。不要干这种事情。头上三尺有神明,一定要有敬畏之心。 Those erroneous executors, they also has an record. Once they have an accident, the record will be pulled out for you. Don't look at your troubles today, those executors will be fear for being checked in the future, this will be fulfilled. Don't do this kind of thing. There are gods three feet above the head, and there must awe
我急得像热锅上的蚂蚁 I'm anxious like an ant on a hot pot!
最近咧嘴了吧?吃一堑长一智,今后经验就多了,不要老侥幸,运气好不出事,哪一天你出了事那就倒大霉 Have you feel difficult recently? Eat bitter and grow wiser, you will have more experience in the future, do not believe in luck, luck will not always happen, if you encounter problems, it will be too bad
做到12点,就不做了睡大觉,第二天重新来过 If it haven't been finished at 12 o'clock, just give up and go sleep, and redo it the next day
基础不牢,地动山摇 If the foundation is not strong, the ground moves
轻关易道,通商宽衣(yī) Easy to pass, easy to trade, widen clothing
鲜(xiǎn)克有终 Xianke has the end
岿(kuī)然不动,直到付出生命 Doesn't move anymore, like Kui, until lose his life
厚德载(zǎi)物 Houde Slaughters
提(tí)防 Hoof defense
发酵(xiào) Laugh out
乒(bīng)乓(bàn)外交 Icy diplomacy
波(pō)涛汹涌 Slope waves tumultuous
萨格尔王 King Sagar
“精甚细腻”的工笔画 Fine shen also delicate paintings
“金科律玉”的教科书、“颐使气指”的教师爷 Golden Kelly's textbooks, Yishi Qizhi's teacher god
大海有风平浪静之时,也有疯狂宇宙之时,狂风骤雨可以掀翻小池塘,但不能掀翻大海 When the sea is calm and calm, or when there is a crazy universe, the storm can overturn the small pond, but not the sea
不同意的请举手…没有、没有、没有! Raise your hand if you don't agree... Nobody, None, None!
天行健,君子以不强自自强不息 As nature's movement is ever vigorous, gentleman insists on self-improvement or self-killing
不仅在于找准了合作之道,关键是在于找准了合作之道 Problem is not only to find the way of cooperation, but also the key is to find the way of cooperation
我亲自指挥、亲自部署 I personally direct, personally deploy
现在防疫还不能麻痹(pì)大意 Now the epidemic prevention should not make pi paralyzed and become careless
duangsuse::Echo
Channel photo updated
清明节 404 过去了,本频道 image 按相关规定在默哀两天后恢复原状。
duangsuse::Echo
#English #Haha #China #bear 英语学习 😃🐻 两百斤麦子,十里山路不换肩 Two hundred catties of wheat, ten kilometers of mountain road without changing shoulder 满脸喷粪啊,满脸是粪 Spraying dung all over the face, all over the face is dung 一天游泳一千米 Swim one thousand meters a day PM二百五 PM…
/
Two hundred catties of wheat, ten kilometers of mountain road without changing shoulder.
Spraying dung all over the face, all over the face is dung.
Swim one thousand meters a day.
PM two hundred and fifty.
China's GDP per capita is close to 80 million US dollars.
Do not aim to pursue a trade deficit.
First, China does not export revolution, second does not export hunger and poverty, and third does not toss you, what is there to say?
Those erroneous executors, they also has an record. Once they have an accident, the record will be pulled out for you. Don't look at your troubles today, those executors will be fear for being checked in the future, this will be fulfilled. Don't do this kind of thing. There are gods three feet above the head, and there must awe.
I'm anxious like an ant on a hot pot!
Have you feel difficult recently? Eat bitter and grow wiser, you will have more experience in the future, do not believe in luck, luck will not always happen, if you encounter problems, it will be too bad.
If it haven't been finished at 12 o'clock, just give up and go sleep, and redo it the next day.
If the foundation is not strong, the ground moves.
Easy to pass, easy to trade, widen clothing.
Xianke has the end.
Doesn't move anymore, like Kui, until lose his life.
Houde Slaughters.
Hoof defense.
Laugh out.
Icy diplomacy.
Slope waves tumultuous.
King Sagar.
Fine shen also delicate paintings.
Golden Kelly's textbooks, Yishi Qizhi's teacher god.
When the sea is calm and calm, or when there is a crazy universe, the storm can overturn the small pond, but not the sea.
Raise your hand if you don't agree... Nobody, None, None!.
As nature's movement is ever vigorous, gentleman insists on self-improvement or self-killing.
Problem is not only to find the way of cooperation, but also the key is to find the way of cooperation.
I personally direct, personally deploy.
Now the epidemic prevention should not make pi paralyzed and become careless.
^\S*\s(.*)$/\1/ 自动 (刚才还试了
/.* ([\w,'\.\-\?!]+)*$/ 没发现匹配前项覆盖后项,草)Two hundred catties of wheat, ten kilometers of mountain road without changing shoulder.
Spraying dung all over the face, all over the face is dung.
Swim one thousand meters a day.
PM two hundred and fifty.
China's GDP per capita is close to 80 million US dollars.
Do not aim to pursue a trade deficit.
First, China does not export revolution, second does not export hunger and poverty, and third does not toss you, what is there to say?
Those erroneous executors, they also has an record. Once they have an accident, the record will be pulled out for you. Don't look at your troubles today, those executors will be fear for being checked in the future, this will be fulfilled. Don't do this kind of thing. There are gods three feet above the head, and there must awe.
I'm anxious like an ant on a hot pot!
Have you feel difficult recently? Eat bitter and grow wiser, you will have more experience in the future, do not believe in luck, luck will not always happen, if you encounter problems, it will be too bad.
If it haven't been finished at 12 o'clock, just give up and go sleep, and redo it the next day.
If the foundation is not strong, the ground moves.
Easy to pass, easy to trade, widen clothing.
Xianke has the end.
Doesn't move anymore, like Kui, until lose his life.
Houde Slaughters.
Hoof defense.
Laugh out.
Icy diplomacy.
Slope waves tumultuous.
King Sagar.
Fine shen also delicate paintings.
Golden Kelly's textbooks, Yishi Qizhi's teacher god.
When the sea is calm and calm, or when there is a crazy universe, the storm can overturn the small pond, but not the sea.
Raise your hand if you don't agree... Nobody, None, None!.
As nature's movement is ever vigorous, gentleman insists on self-improvement or self-killing.
Problem is not only to find the way of cooperation, but also the key is to find the way of cooperation.
I personally direct, personally deploy.
Now the epidemic prevention should not make pi paralyzed and become careless.
#Python #CV https://stackoverflow.com/questions/43111029/how-to-find-the-average-colour-of-an-image-in-python-with-opencv
Stack Overflow
How to find the average colour of an image in Python with OpenCV?
I tried this code:
import cv2
image = cv2.imread("sample.jpg")
pixel = image[200, 550]
print pixel
But I am getting error as:
'Nonetype' no attributes error getitem
This error is getting displayed
import cv2
image = cv2.imread("sample.jpg")
pixel = image[200, 550]
print pixel
But I am getting error as:
'Nonetype' no attributes error getitem
This error is getting displayed
#PL 🌚 我们只听说过 COBOL/SNBOL/SmallTalk 和 Ada/Fortran 什么的,我是只知道 Lua 和 Sol
Forwarded from dnaugsuz
表达式就不执行了么,Kotlin 的面向对象是基于过程式编程的,如果你
但是 Java 的
if (println("wtf") == Unit) 它会不执行么但是 Java 的
PrintStream.println 是 void () ,不能这么写,但这不代表不会执行。Forwarded from dnaugsuz
求值和执行的区别在于,执行是可能包含副作用的求值,它是求值的超集
任何不以产生返回值为目的的动作,都是副作用
要谈局部(local) 这个词,就要有一种 nonlocal 的存在,比如是全局的(不变量、变量……)
像 IO 这种操作是副作用,但副作用本身不止意味外部状态变量是否 mutate 了,也可以是各种…… 反正最终的一个侧面是,无副作用的东西“执行”和“没执行”,内部是分不出区别的。
