跳绳

周三重新开始跳绳,基本解决了绳子绊脚的问题,诀窍是低头,弯腰,放松,这些方法也是一位少时老友,我称他为“跳绳届的仁波切”,传授与我。

公司在中午很仁慈,11:30-13:00,一个半小时包含进食和午睡,我不喜欢在这里午睡,这里没有行军床,也不会集体关灯。在老东家,有专人负责关灯、拔电话线,中午时分,南山区那座几万人的研发总部大楼,准时进入老僧入定状态,每次去深圳出差,都有种进入新生儿产房的错觉,静谧,甜美,轻微的鼾声此起彼伏。

不午睡的时候,我在三楼健身房,主要是力量训练,半年下来,体重反而增加了,教练说你缺少有氧运动,无法有效减脂。

时间紧迫,我选择有氧效率最高的跳绳运动,一方面有仁波切的远程指导,还有个原因是我从来没有好好跳过绳。从小我没有连续跳够100个,即使曾经百米12秒99时,也无法突破100个;能用脚踢落头顶的树叶时,也无法突破100个,我想,现在是时候突破了。

我用马达妈妈的小红书,关注几个跳绳美女,看她们打卡,一般都是每次跳2000个、3000个,看了一个月后,信心倍增,发现自己跳不好的问题根源,是绳子不好。

换了一根能自锁、含一体化精钢滚珠轴承、带铝合金高强度手柄的钢丝跳绳后,我觉得进入了新天地。技术也突飞猛进,在公司用普通跳绳也能突破100个。

周三就是这样,会议间隙,人困马乏,是跳绳的好时机,非常顺利,很快500个的目标也达成了。

周三晚上做了一个噩梦。

周四起床,发现右脚不能落地,钻心的痛。犹豫要不要开车,很快就放弃了,加油刹车都靠它。在地铁站,在匆匆忙忙的日常打工人群中,缓慢移动,心安理得。

周四晚上做了一个噩梦。

周五一早去武汉,在出发机场,在匆匆忙忙的高端打工人群中,依然缓慢移动,感觉自己像一条鲸鱼,与众不同。客户见面问我怎么了,我说跳绳扭了脚,大家哈哈大笑。

周五晚上,疼痛开始变得有脉动感,即使没有按压也会痛,干扰睡眠,没有睡好。急匆匆预约了医院的骨科,准备周六下午去检查。

周六去天河机场,滴滴司机很健谈,去年疫情期间,她是第一个承担救助任务的女司机,当时国家补贴600元一天,滴滴追加200,40天赚了3万2。加入志愿者时,她们并不知道有补贴,三天后才看到账户有到账,当司机群里说志愿者为了钱,她们很生气,按照她的原话,这些大老爷们xxx。我问她最近的电视、电影,有抗疫的内容,她看了吗。她回答不敢去看,怕自己受不了,因为封禁快结束时,她送一位老人紧急去医院,当时武汉已经开始堵车,她打了双闪,按喇叭,前面的车纷纷向两边避让,这辆挂了抗疫红牌通行证的滴滴快车,在武汉拥挤的街道上,开出了高速路的感觉。她说当时自己穿着防护服,眼泪都流了出来。

不过,她马上又补充,现在堵车,别说按喇叭,喊破喉咙也莫得人让你撒。

很快,天河机场到了,我在滴滴app上默默为这位巾帼英雄,把所有的点赞评价都赞了一次,可惜只能赞一次。

下午的骨科大夫很酷,我自诉:跳绳后,第二天脚痛,大脚趾无法落地,晚上会有持续、规律的悸痛,他说你别跳绳了,你腰椎不好,你这里不是做过CT吗,4和5突出。现在发炎了,你要么打针,要么吃药。打针要两周,吃药更久一点。我说吃药吧,不耽误事,但是不要中药。中成药也不要吗,也不要,我强调。我看到医生开始按删除键,很使劲的按,他精心为我准备的中药被删除了。医生依然面无表情,看着屏幕。那么,大夫,我还做噩梦,和这个椎间盘有关系吗,医生看着屏幕,不说话,万物静默如迷,好像置身新生儿产房。

回家,翻看《全科医学》,发现脚痛是个symbol,年龄越大,这种symbol会变多,对我来说,就是不能跳绳了,年少的梦破碎了。

所以,我打算找些新的事情,哪怕从来没有被梦到过,比如,弹钢琴。

PS:脚痛的原因,虽然医生没有耐心告知,但是这么低的诊疗费,他也给出了令人信服的判断,我还是感谢他。目前我推断的root cause是这样,腰椎间盘,实际是类似果冻一样的组织。它可以帮助腰椎骨这样的刚体互相灵活动作,但是随着年龄增长,加之不良生活习惯,比如久坐、长时间玩手机等,造成果冻老化,机能退化。典型的就是果冻突出,压迫了椎管里部分的神经,这部分神经向下发散,也就是马尾神经,分布到大腿、小腿和足部,造成各种不适。

好消息是,伤筋动骨一百天,那是针对真的扭伤,而腰椎间盘突出造成的不适,几周就能恢复;坏消息是,椎间盘突出不可逆,永远不会根治。

还有,既然是果冻,在强烈的压迫下,会破裂释放液体,造成椎管内神经发炎,向下造成脚痛,向上影响脑神经,晚上的噩梦就很自然了。

奥运精神

几年前,我安排小李加入一个社团,社团名称很有古意,叫做“青林馆” 。

青林馆的主要活动是剑道,社员不分老幼,不论种族,偶有国际友人造访,时不时还举办迎新活动。小李第一杯免费奶茶,就是迎新时享受到的。

不过平时社团活动,是非常严肃,社员更衣后,不分老幼、不论种族、男女平等,一言不发就拔剑互殴 。

互殴之后,社团团长会组织大家团团坐,面向东方先行大礼,之后便是团长solo聊天,此刻社员也不得放松,尿意盎然也必须憋着,喝水则更是不被允许。

除了互殴,稽古也是非常重要的部分,有时候还会有静止动作练习,毕竟“学会忍耐,就能控制自己的心-某剑道名人名言”

小李学业负担较重,暑假期间也是日理万机,奔波在B站和Xbox之间,在剑道社团的表现一直比较佛系。这几天东京奥运盛会,我们全家也深受鼓舞,热烈的气氛感染了小李,击剑金牌得主孙一文的一剑封喉,更让小李跃跃欲试,大有王侯将相吾大丈夫可取而代之的豪情霸气。

也许奥运精神真的激励小李,周日剑道活动结束后,社团团长发来贺电,要求为小李加鸡腿。

从青林馆离开,我采访小李有啥感想,小李淡淡的说,我动作标准吧,好像夸了夸我。。。

适逢东京奥运,以兹留念。

对事与对人

我们常说,“这次是对事不对人啊” 。但最终结果往往演变为对人采取行动,或者由具体的人来承担后果。

我看这个问题,类似炒股票。短期看每一支股票的涨跌,似乎都是有不确定的因素影响着,例如昨天互联网股票大跌,很大程度是滴滴安全事件造成的。这就是典型黑天鹅本身。

而长期来看一支股票,它的内在价值,又是相对确定的。例如腾讯、阿里。

所以,发生一件具体的事情,从各方反馈、搜集的信息,会有意无意忽略各种细节,加上时空因素,人的因素,不确定性就很高了。

而具体到一个人,则脾气秉性,自我定位相对稳定。如果又是一个执拗不肯听劝的人,有时候只能远离了。

树挪死,人挪活,核心就是说自我定位。自我定位过高,就会时不时陡生怨气;定位过于狭窄,则被他人看作畏难退缩,站位不高。

我是老员工,我是老专家,我是甲方,都是自己给自己扣帽子,上枷锁的行为。

自我定位不准,是负面情绪产生的根源。

不过,企业组织内为了利益,发生对抗是可以理解的,不过被情绪驱动,就不是一个leader要做的事情。

四季印象

傍晚送马达去康桥。

在电梯里聊到四季的不同,我问他喜欢哪一个季节?马达排序是夏天、秋天、冬天、春天。春天在最后因为没有什么景色。

马达补充到,夏天傍晚最好,秋天是早晚,冬天是中午。

产品团队如何降低经营风险

面对纷杂的市场需求,当我们无法快速做决定时,如何规避风险(因为我们的时间、资源都是有限的,机会成本!!!):

定制化项目开发:

缺乏充分市场调研,团队无法确定市场潜力、市场增长率,不了解竞争环境(至少2家竞争对手),通过获得中标、课题或签订合同(采购、委托开发)等方式来降低经营风险;

产品开发:

充分的市场调研(规模、增长、客户是否可达、是否符合公司战略)
充分的需求($APPEALS)
进入三要素(市场是否有吸引力、我是否能赢、财务ROI是否满足要求)
通过以上评估过程,降低产品经营的风险。

技术开发:

通过技术标准制定、专利保护、技术方向引导等方式,规避大规模长期技术开发投入的风险

器件和部件:

通过委外开发或外部采购方式,规避自研风险

Learn to program with Minecraft and Python

http://www.broadview.com.cn/book/156

0.1 https://www.nostarch.com/pythonwithminecraft/
1.1 https://www.nostarch.com/pythonwithminecraft/
1.2 https://minecraft.net/
1.3 https://minecraft.net/download
1.4 http://www.python.org/downloads/
1.5 http://www.java.com/en/download/
1.6 http://www.java.com/en/ download/help/path.xml
1.7 https://www.nostarch.com/pythonwithminecraft/
1.8 https://minecraft.net/download
1.9 https://www.python.org/downloads/mac-osx/
1.10 http://www.oracle.com/technetwork/java/javase/downloads/index.html
1.11 https://www.nostarch.com/pythonwithminecraft/
1.12 http://www.raspberrypi.org/
10.1 https://www.nostarch.com/pythonwithminecraft/
11.1 http://pypi.python.org/
11.2 http://flask.pocoo.org/docs/0.10/tutorial/
12.1 https://www.nostarch.com/pythonwithminecraft/

Troublshooting

https://nostarch.com/minecrafthelp
The book Learn to Program with Minecraft requires Minecraft 1.8 or 1.9, Python 3.6 or newer and Java 8 or newer. If you're having difficulty getting your environment set up, software versions are the most likely problem. Follow the instructions on this page to check that you are using the correct versions of Minecraft, Python, and Java.

If you've confirmed that you have the correct versions and you're getting other errors, refer to the later sections in this document (linked below).

Pick the Right Minecraft Version
Am I Using the Right Version of Python?
Am I Using the Right Version of Java?
What If I Have Two Versions of Python on My Computer?
Start_Server, File Cannot Be Found (For Windows)
Connection Refused Error (For Mac)
Nothing Happens After I Click Install_API (For Windows)
Permissions Error When Installing API (For Mac)
Unicode Decode Error (For Windows)
I Got a Different Error!

Unfortunately, we do not have any dedicated Python programmers on our team, so we are unable to troubleshoot more complex errors. Sorry for the inconvenience!

Pick the Right Minecraft Version
Purchase the standard Minecraft version from minecraft.net to follow along with the book. You must have Java Edition for Windows and OSX or Pi Edition for the Raspberry Pi.

Please know that Minecraft Windows 10 Edition, Minecraft for Xbox, Minecraft: Education Edition, and Minecraft: Pocket Edition are not compatible with the book.

In order to use your Spigot server, your Minecraft version needs to match the Spigot version exactly. But new versions of Minecraft come out all the time, so if you update Minecraft, Spigot won’t work with the new version anymore. In order to make your Spigot and Minecraft versions match, you can set up a profile.

When you set up a profile, you tell Minecraft that you only want to use the version of the game that will work with the version of the server that you are using. In other words, a profile allows you to continue using the same server even when newer versions of Minecraft are released.

Once you set up a profile, you should be able to use our book’s coding directions and you'll know one more of Minecraft’s secrets, and will be further along on your journey to become a Minecraft Master!

Let’s get started.

For Windows

You’ll need to set up a profile to make sure Spigot and Minecraft are always running the same version. To start Spigot, follow these steps:

Step 1. Go to your Minecraft Python folder and open your Minecraft Tools folder.
Step 2. In the Minecraft Tools folder, double-click the Start_Server file. If you get a message asking whether you want to allow access, click Allow.
Step 3. A window will appear and begin to set up the server. If you see a message that says the server is out of date, don’t worry; you don’t need to update the server for it to work.
Step 4. Once the setup is finished, scroll to the top of the text in the window. Near the top (around the third or fourth line), you should see text saying Starting minecraft server version x.x.x. For example, 1.16.3.
Step 5. Make a note of the version number shown on your screen, and keep this window open.

Now that you know which server version you’re using, you can set up the game profile:

Step 1. Open the Minecraft launcher, but don’t click the green PLAY button quite yet (make sure you leave the server window open when you do this).
Step 2. At the top-right of the Minecraft launcher, click the menu button (which looks like three parallel lines), then click the Launch Options button. This will allow you to access the profile editor.
Step 3. Click the Add New button to create a new configuration.
Step 4. In the Name field, type Learn to Program with Minecraft.
Step 5. In the Version drop-down menu, select the version of the server that you’re using. For example, version 1.16.3.
Step 6. Click the Save button. Your profile has now been set up. Click the central Minecraft logo to return to the screen with the green PLAY button.

From now on, every time you want to use Minecraft with this book, click the arrow next to the Minecraft launcher’s start button. Select the Learn to Program with Minecraft option to use the correct version for the server. You can swap back to the latest version of Minecraft at any time by changing this drop-down menu to the Latest Release option. Once you have selected the correct version, click PLAY!

For Mac

You’ll need to set up a profile to make sure Spigot and Minecraft are always running the same version. To start Spigot, follow these steps:

Step 1. Go to your MinecraftPython folder and open your MinecraftTools folder.
Step 2. In the MinecraftTools folder, CONTROL-click the Start_Server file and select Open. (If you get an error message, go to System Preferences and then to Security and Privacy and click Open Anyway.)
Step 3. Once the setup is finished, scroll to the top of the text in the window. Near the top (around the third or fourth line), you should see text saying Starting minecraft server version x.x.x. For example, version 1.16.3.
Step 4. Make a note of the version number shown on your screen, and keep this window open.

Now that you know which server version you’re using, you can set up the game profile:

Step 1. Open the Minecraft launcher, but don’t click the green PLAY button quite yet.
Step 2. In the top-right corner of the Minecraft launcher, click the menu button (which looks like three parallel lines), then click the Launch Options button. This will allow you to access the profile editor. Click the Add New button to create a new configuration.
Step 3. In the Name field, type Learn to Program with Minecraft.
Step 4. In the Version drop-down menu, select the version of the server that you’re using. For example, version 1.16.3.
Step 5. Click the Save button. Your profile has now been set up. Click the X in the upper-right corner, then click the central Minecraft logo to return to the screen with the green PLAY button.

From now on, every time you want to use Minecraft with this book, select the Learn to Program with Minecraft option in the drop-down menu to the right of the green PLAY button. You can swap back to the latest version of Minecraft at any time by changing this drop-down menu to the Latest Release option.

Am I Using the Right Version of Python?
Follow these steps to make sure you're running Python 3.6 or newer.

Note: If you find that you have both Python 2 and Python 3 installed, you should uninstall Python 2—or follow the instructions in “What If I Have Two Versions of Python on My Computer?” below.

For Windows

The simplest way to confirm you’ve gotten the right version of Python is to go to the Start menu, then search for Python. If you don’t see a search box, you can just start typing Python to search. This will show you every version of Python that you have installed on your machine. The Python version number might be part of the name that shows up in the Start menu; if not, open IDLE and the version number will be displayed in the shell.

If you don’t have version 3.6 or newer, you’ll need to install the updated version. Follow the steps in “Installing Python” in the book.

For Mac

Step 1. Open Finder and search for Terminal. Click Terminal to open it.
Step 2. At the Terminal prompt, enter Python -V (note that the V is uppercase).
Step 3. You will see the Python version number—if it's anything older than 3.6, you'll need to install an updated version. Follow the steps in Chapter 1 to install Python version 3.6.

Am I Using the Right Version of Java?
Follow these steps to make sure you're running Java 8 or newer.

For Windows

You should be able to see all the installed programs in the Windows Start menu, including Java. The simplest way determine which version you have installed is to do the following:
Step 1. Go to the Start menu.
Step 2. Choose All Programs.
Step 3. Find the Java folder and click About Java.

You can also test the version of Java by using this method:
Step 1. Open the Start menu, search for cmd, and open the command prompt.
Step 2. Run the command java -version. You will see a message that says something like java version "1.8.0_72". The version of Java that you are using is the number after the first dot, which is version 8 in our example message. If your version is older than 8 (or if Java isn’t installed at all!), you’ll need to update or install Java. To do so, follow the installation instructions in Chapter 1.

For Mac

Step 1. Open Finder and search for Terminal. Click Terminal to open it.
Step 2. At the Terminal prompt, type java -version and press RETURN.
Step 3. You will see a message that says something like java version "1.8.0_72". The version of Java that you are using is the number after the first dot, in this case version 8. If your version is older than 8, you'll need to update Java. To do so, follow the installation instructions in Chapter 1.

What If I Have Two Versions of Python on My Computer?
If you want to have both Python 3 and an older version of Python installed, and if you have an older version of the Install_API file, you need to modify the file to specify that it should use Python 3 rather than the older version.

The Minecraft Python API will work with older versions of Python, but you must use Python 3 if you want to run all the code examples from this book—otherwise you’ll get an error if you try to use the print() function and a few other Python things. But you can still keep another, older version of Python on your computer if you want to.

Install the Minecraft Python API by following the Windows or Mac instructions in the following sections. Once you’ve installed the API, you’ll need to make sure that you use the correct version of IDLE. Make sure you use IDLE 3 when writing and running code—otherwise the programs from this book will not work.

For Windows

If you have the older version of the Install_API file, then you’ll need to modify it. To modify the In-stall_API file, follow these steps:

Step 1. Open the Minecraft Tools folder and find the Install_API file.
Step 2. Right-click the Install_API file and select Edit.
Step 3. Once the file opens, find the line that begins with this:

python -m pip install minecraftPythonAPI.zip

Step 4. Edit the line by changing python to python3 so that the line looks like this:

py -3 -m pip install minecraftPythonAPI.zip

Step 5. Save the file and close it.
Step 6. Double-click the Install_API file to install the Minecraft Python API.

For Mac

If you have the older version of the Install_API file, then you’ll need to modify it. To modify the In-stall_API file, follow these steps:

Step 1. Open the Minecraft Tools folder and find the Install_API file.
Step 2. Control-click the Install_API file and select Edit.
Step 3. Once the file opens, find the line that begins with this:

python -m pip install minecraftPythonAPI.zip

Step 4. If you can’t find that line, then you already have the new file and don’t need to do anything else. Otherwise, edit the line by changing python to python3 so that the line looks like this:
python3 -m pip install minecraftPythonAPI.zip

Step 5. Save the file and close it.
Step 6. Double-click the Install_API file to install the Minecraft Python API.

Start_Server, File Cannot Be Found (For Windows)
When you click on the Start_Server file you might see a window saying “Windows cannot find 'C:\Users\Frank\Documents'” or something similar.

To work around this issue, open the server folder and double click on the start.bat file. The server should start normally. Every time you need to start the server in the future repeat these steps.

Alternatively, download the latest version of the book's setup files, Minecraft Tools, linked on the book's web page.

Connection Refused Error (For Mac)
In Python, after typing the line mc = Minecraft.create(), you might get an error message like this:

ConnectionRefusedError: [Errno 61] Connection refused

or a similar error like this:

ConnectionRefusedError: [Errno 10061] No connection could be made because the target machine actively refused it.

This error is most frequently caused by an out-of-date version of Java installed on your computer. In order to fix this issue, follow the Java installation instructions in Chapter 1.

If you still get this error after reinstalling Java, your Mac might be using an old version of Java only on the command line. To fix this issue, do the following:

Step 1. Click the search icon on the top-right corner of your screen.
Step 2. In the search box, enter Java Preferences.
Step 3. When the preferences box opens, make sure that only the Java 8 checkbox is ticked.

After you have changed these preferences, the problem should be resolved. However, if you still have this issue, uninstall older versions of Java and then reinstall Java 8.

Nothing Happens After I Click on Install_API (For Windows)
When you run the Install_API file during step 5 of “Installing the Minecraft Python API and Spigot” (page 6), you might see a black window pop up.

If you see a window like this, you might be experiencing a bug with pip, which is used to install the API. To work around this, you need to install the Minecraft Python API via the command line. Follow these steps:

Step 1. Open the Minecraft Tools folder. You should see the minecraftPythonAPI.zip file.
Step 2. In the file browser, click the address bar to highlight it, then copy the text (right-click and select Copy, or press CTRL-C). The address should look something like this:

C:\Users\user\Minecraft Python\Minecraft Tools

Step 3. Click the Start menu and search for PowerShell. Click PowerShell to open it.
Step 4. At the PowerShell prompt, type cd and then right-click to paste the address of your Minecraft Tools folder.
Step 5. Add single quotation marks around the text you just pasted. The line should look something like this:

cd 'C:\Users\user\Minecraft Python\Minecraft Tools'

Step 6. Press ENTER. Now you can run commands in PowerShell using the contents of the Minecraft Tools folder.
Step 7. On the next line, type the following command to install the API:

python -m pip install minecraftPythonAPI.zip

Step 8. Press ENTER. The Python API should now be installed correctly.

Permissions Error When Installing API (For Mac)
During step 8 of “Installing the Minecraft Python API and Spigot” in Chapter 1, you might get this error:

The directory '/Users/YourUserName/Library/Caches/pip/http' or its parent
directory is not owned by the current user and the cache has been
disabled. Please check the permissions and owner of that directory. If
executing pip with sudo, you may want sudo's -H flag.

Check all the folders that the Install_API file is inside of and remove any spaces from the folder names. To do this, follow these steps:

Step 1. Control-click the icon of the folder with a space in the name.
Step 2. From the pop-up menu, select Rename, then remove the space from the folder’s name. Note that you should not have to do this with the hard drive itself (Macintosh HD)!

Once you have done this, try running the Install_API file again.
On some Macs, you might still get an error—however, the API has still installed correctly. If you see the following line, the API has installed correctly and you can ignore the error message:

Requirement already satisfied (use -–upgrade to upgrade): py3minepi…

Unicode Decode Error (For Windows)
When you run the Install_API file during step 5 of “Installing the Minecraft Python API and Spigot” in Chapter 1, you might get this error:

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc0 in position 44: invalid start byte

Your Windows system may be using an encoding method that's different from the one Python assumes. Follow these steps:

Step 1. Navigate to

'C:\Users\user\AppData\Local\Programs\Python\Python36\Lib\site-packages\pip\compat'

This path is for those running Python 3.6 and will differ slightly for other versions.

Step 2. Open init.py in a text editor, and change line 75 to this:

return s.decode('cp949')

Making this change and saving the file should resolve the problem.

I Got a Different Error!
Unfortunately, we do not have a dedicated Python programmer on our team, so we are unable to troubleshoot more complicated issues on your behalf at this time. If you get an error that isn't listed on this page, we would encourage you to search for the error online. We're sorry for the inconvenience, but thank you for your understanding!

为屠龙刀找龙

背景

这两天,依图IPO中止了,尽管他们出面澄清是自己主动申请,而且强调是“中止”不是“终止”,但是面对一夜暴富的机会,谁会中止呢?阿桑奇也没止住。

冲突

最近吧,遇到一个问题,要为AI智能平台找到应用的场景,实际就是要找到这个产品的价值。

问题

市场是最公平的,你压货、对倒,最终都会被市场打出原形,谁的钱是平白无故给你呢?只有政府这个傻冒吧。

答案

政府也不傻,这类高科技独角兽,在大G面前,就是痰盂、夜壶,想端出来的时候,就端一下,
那么,就做一个集成商吧,被另外一个集成商当作痰盂,来,单一来源采购吧。

找不到龙,what's different between 菜刀&屠龙刀?

查找wordpress数据库密码

查找mariadb数据库密码

查找wp-config.php这个文件,找到password就可以

# find -name wp-config.php
./var/www/html/wordpress/wp-config.php
# vi ./var/www/html/wordpress/wp-config.php

while用法

When condition is true, which include the result(true or false) of operator like 'not equal(!=)' or 'less than(<)'or 'greater than or equal to(>=)', the statement after colon will be executed.

When we use function input, the function will return string type, so if we want compare result with number, we can use str() to convert number to string and int() to convert string to int.

message = input('if you input 0,then everthing is over')
i = 1
while message != str(0) and i <=10 :
    print(str(i)+' '+message)
    i +=1

cv2.destroyAllWindows()出错

Jupyter's error can not be solved immediately, however when I run the script in terminal, error message is here:

.../Study/learningOC[15:52]python3 cameraFrames.py
Showing camera feed. Click window or press any key to stop.
Traceback (most recent call last):
  File "...Study/learningOC/cameraFrames.py", line 19, in <module>
    cv2.destroyAllWindows('MyWindow')
SystemError: <built-in function destroyAllWindows> returned NULL without setting an error

Therefore I check the demo code:

import cv2

clicked = False
def onMouse(event, x, y, flags, param):
    global clicked
    if event == cv2.EVENT_LBUTTONUP:
        clicked = True

cameraCapture = cv2.VideoCapture(0)
cv2.namedWindow('MyWindow')
cv2.setMouseCallback('MyWindow', onMouse)

print('Showing camera feed. Click window or press any key to stop.')
success, frame = cameraCapture.read()
while success and cv2.waitKey(1) == -1 and not clicked:
    cv2.imshow('MyWindow',frame)
    success, frame = cameraCapture.read()

#cv2.destroyAllWindows('MyWindow')
cv2.destroyAllWindows()
cameraCapture.release()

After deleting the arguments 'MyWidows' in destroyAllWindows, the script is running well.