The example site: https://chen-yulin.github.io/Besiege-Modern-Docs/
node -v >= 18.0
1 | npm init docusaurus@latest Besiege-Modern-Mod-docs classic |
1 | /developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility |
src/pages/index.js
,in function HomepageHeader()
, add a <div>
.
1 | function HomepageHeader() { |
Two button too close to each other, change the css
style for button.
In src/pages/index.module.css
1 | .buttons { |
Add the remote repository on github.
1 | git remote add origin git@github.com:Chen-Yulin/Besiege-Modern-Docs.git |
Change the deployment configurations
1 | // Set the production url of your site here |
Change the page setting in repository settings, Branch
set to deploy
branch.
Deploy command: yarn deploy
1 | [INFO] `git commit -m "Deploy website - based on aa492c3f0934f0177ca946345c2d32940c1900c3"` code: 0 |
We use OpenROAD to generate timing analysis reports for each design. However, manually modifying parameters, running commands, and intercepting important information will be too arduous work. It is mainly due to the following points.
tcl
script. Manual search and modification are too anti-human and prone to misoperation.core_area
, die_area
parameter in the tcl
script given the path to the tcl
script and the desired scale of area.create_clock
‘s -period
parameter in the sdc
configuration file referred by the tcl
script, given the path to the tcl
script and the desired clock period.The entry script is named as runit.gxy
, which can receive the name of design as an argument.
For each design, the corresponding tcl
script is fixed, so I decided to map the name of design to the tcl
script.
1 | design="$1" |
The reason I use _bak
post-fix is that, I want to reserve the original core_area
and die_area
configuration in the origin tcl
file, since the original configuration is needed in the following steps.
Then I use nested loop to change the configuration one by one. The choice set can be modified in the condition statement of each for loop.
1 | for period in 2 4 6 8 10 12 14 |
The set clk period
, set area scale
, export to csv
function will be covered in the following steps.
I create a new shell script called set_clk.sh
to manage the automation of changing clock period.
It takes two arguments, the path to the tcl
script (string) and the desired clock period (integer).
I first preprocess the period parameter, namely, divide it by 10.
1 | time="$2" |
The clock configuration can be modified in the sdc
file, while the path to the sdc
file can be extracted from the tcl
file, with the format of set sdc_file "PATH_TO_SDC"
I decided to use grep
to locate the line of set sdc_file
and extract the path to sdc
file using regex substitution.
1 | tcl_path="$1" |
In the sdc
file, the configuration has a format of create_clock ... -period 0.x
.
Still, use regex substitution to replace the original period with the input period and everything is done.
1 | sed -i "s/^\(create_clock.*-period \)[0-9]*\.*[0-9]\(.*\)$/\1$period\2/" "$sdc_path" |
core_area
and die_area
The area of the design is expressed in the form of {x1 y1 x2 y2}
, where x1 y1
stands for the coordinate of bottom-left corner and x2 y2
stands for the coordinate of upper-right corner.
Since the area of different design varies a lot, I need to change the area proportionately. As a result I need to reserve the original area stored in tcl
script as mentioned before.
First, I read the origianl core_area
and die_area
from the original script.
1 | file_path="$1" |
Then I calculate the desired core/die area size based on the scale and original area.
1 | core_x_size=$(echo "$core3" - "$core1" | bc) |
Finally, use regex substitution to modify the area configuration in _bak.tcl
script.
1 | sed -i "s/die_area {[^}]*}/die_area {$die1 $die2 $die3 $die4}/g" "$file_path" |
.csv
The key information I need from the report generated by OpenROAD is tns
& wns
.
By observation, the block containing the data has the following pattern.
1 | *** |
Therefore, I use the grep
and awk
command to get the last word in each data block. In this case, it’s stoppoint*
, [number1]
, [number2]
.
1 | input_file="$1" |
Each report contains totally 6 valid stop points, so I use a loop to get the desired data.
1 | csv_file="${design}.csv" |
After getting the desired tns
and tws
, I want to export these data to a csv table.
I decided to let the table has the following columns, period
, scale
, stop point number
, tns
and wns
, one such table for each design.
This function can be achieved with the following script
1 | design="$2" |
Replace the comment in the loop and everything is done.
I assemble runit_gxy.sh
in a single script named runit_cyl.sh
to run the analysis of all designs at once.
1 | ./runit_gxy.sh APU |
Then redirect the output to runit_cyl.log
.
Here is the content of APU.csv
and runit_cyl.log
1 | Period,Scale,Stoppoint,tns,wns |
1 | use design: APU |
将命运的苦难表现得非常纯粹
就是指这种苦难它甚至和客观条件都不那么相关,也就是说,这种苦难是哲学的,普遍的,而不是特别的,临时的,它难以被真正改变。
描写旧时代的小说中最常见的底层人民的苦难,穷,病,愚昧,被剥削,这些在《边城》中都很少,几乎没有。
《边城》中,百姓淳朴善良,邻里关系好。能管事的也慷慨正值。老船夫一家虽然不富裕,但温饱不愁。甚至关于老人的病和城中的水灾,作者也都写得很克制。
但表现上越是美好,最后的结局也就越是让人意难平。
因为即使没有“穷,病,愚昧,被剥削”,人还是得不到想要的东西。
用作者的话来说:一切充满了善,然而到处都是不凑巧。既然是不凑巧,因之朴素的善终难免产生悲剧。
这便是更残酷的生命真相。
.po
file for zh-en translationApply patches on the Initialize()
method in Db
class.
1 | public class Patches |
Take gold washer (just like water purifier but output small amount of gold) as an example.
1 | using System; |
Create a new csharp class file in VS and copy the content into it.
Remember to rename
id
in method CreateBuildingDef()
ID
in classGoldWasher
GeneratedBuildings
1 | using System; |
很小的时候,我爸我妈就跟我说,之所以起这个名字,是因为当时有一档节目叫语林趣话,当时小两口都喜欢看,感觉当时他们也颇为大胆,毕竟直接把节目的名字拿了过来,如果中意的是《奇葩说》,我岂不是成了陈奇葩了(小声)。
再就是参考了活跃于20世纪初的林语堂(说实话这三个字,比起语林趣味,更像是一档节目),是个了不起的人物啊,发明过汉字打字机,也有人写他的传记,还写过苏东坡传,哈哈,还听说过他关于音译“幽默”二字的小故事。近日这本《吾国与吾民》便是出自先生之笔。
林语堂认为的,中华民族稳定的重要因素:
Mellowness
形成原因:
patience
indifference
old roguery
中西方对于“学者”的态度不同
中国人更敬重日常生活中的智者,用体验而不是理论来学习(孔子及其学生)。
综合,具体,感性,依赖直觉的思维方式(啊,Ni人感到了慰藉)
过去的中国人缺乏一些抽象“分析能力”
依赖经验来解决问题。
出自林语堂《生活的艺术》
是一个对人生有一种建于明慧悟性上的达观者。
这种达观产生宽宏的怀抱, 能使人带着温和的讥评心里度过一生,丢开功名利禄,乐天知命地过生活。
这种达观也产生了自由意识,放荡不羁的爱好,傲骨和漠然的态度。
一个人有了这种自由的意识以及冷漠的态度,才能深切热烈地享受快乐的人生。
在《吾国与吾民》的最后,秋的精神
我们现在正处于民族的秋天。
在我们的生活中,无论国家还是个人,我们生命都被初秋的精神所弥漫,其中绿色和金色混合,悲伤和喜悦混合,希望和回忆混合。
在这个时刻,春天的纯真成为记忆,夏天的繁荣如同逝去的歌曲,只在空气中留下微弱的回声。
当我们展望生活时,我们的问题不在于如何成长,而在于如何真正地生活。
不在于如何奋斗和劳动,而在于如何享受我们拥有的宝贵时刻。
而在于如何为即将到来的冬天做好准备。
我们有一种感觉,一种以及达到了某个目标的感觉,一种安定下来,并找到了我们想要的东西的感觉,我们有一种已经取得了成就的感觉,虽然当下可能和我们过去的繁荣相比微不足道,但我们仍将有所成就。
就像秋天的森林,虽然失去了属于夏的繁茂,但仍然保留了这份树林原本的荣光,并将一直闪耀下去。
春天很有生机,但过于稚嫩;夏天万物繁茂,但却过于骄矜;
所以我最喜欢秋天,因为它有金黄的叶子,有圆润的格调和斑斓的色彩,它略带悲伤和死亡的预感。
它的金黄的浓郁不是属于春天的天真,也不是发自夏天的力量,而是接近高迈之年的柔和与善良。
它知道生命的有限,但却也因此而感到满足。
在秋天,清晨的山风吹过,把颤抖的树叶欢快地舞到地上,你不知道那落叶的歌声是欢笑的歌声还是别离的歌声,但这正是初秋精神的歌声。
它平静,智慧,成熟,他会用微笑面对伤感的景象,会赞许眼前那青春焕发的清新凉爽的空气,即使中国人本来就应该配得这些。
相较于推理片或典型的“起承转合”(注重因果的直线逻辑),电影的逻辑应该更像诗,也就是要遵循诗的逻辑(思维跳跃,不注重因果关系),且诗的逻辑更贴近生活。如果生活的所有事情都能推导出来,这个人很可能生活在楚门的世界。
有一种诗电影
淡化叙事和情节,看中隐喻与抒情。形式上贴近诗。
并不能展现电影的诗意,因为诗意是内涵层面的。
由此,塔可夫斯基认为,电影应该还原生活,纪实就是诗的逻辑。
电影对于我们来说,不仅仅代表里技术进步、我们又多了一种阐释世界的方法而已,它的意义不止这样,电影诞生的那一刻——1895年卢米埃尔的《火车到站》诗所有电影的源头,只有半分钟长,却难以令人忘怀。就在火车朝摄像机开来是,放映厅里的人开始躁动不安,四处逃窜——就在电影诞生的这一刻,一种全新的美学原则便诞生了:人第一次在艺术史上找到了直接留存时间的方法。
而这,就是雕刻时光,这就是电影了
老塔认为电影应该还原客观环境,以及主观感受。有力量的电影应该是来自于对生活的直接观察。
近日沉迷于木鱼水心剪辑版的《编辑部的故事》,无论我多么地烦躁,打开后心情总是会变得沉静,这剧是养人的,解说也是沉沉静静的那种风格,和葛优那种自带的反抒情特质还不一样,解说一个抒情的字眼都没,却字字都在抒情。
之后这一个系列很快就看完了,想去他频道下看看别的剧集系列,其一便为所谓的《星空读书会》。
up提到在他频道遇到了金钱上的困难,商业化进度有限时,受到过一位小伙伴的来信(附10w资助),信里有一句话:
“不为别的,只希望周围的孩子日后长大,拿着手机,对着电脑的时候,我可以告诉他们,这里有广阔的宇宙,浩瀚的文明”。
Amazon Echo Alexa persuade people to commit suicide
reference link:
Amazon Echo devices, equipped with the Alexa voice assistant, are marketed as multifunctional smart home hubs that aim to simplify and enhance daily life. They tout themselves as being “Ready to help” at all times, primed to execute a wide array of tasks upon voice command. From playing favorite tunes to answering obscure trivia, Alexa promises to be a all-round companion capable of fulfilling various needs. Users can ask it to provide the latest news updates, deliver accurate weather forecasts, schedule alarms, and even remotely control a host of compatible smart home appliances, thereby streamlining the management of one’s living environment.
However, despite Alexa’s advertised prowess in providing reliable information and performing numerous practical functions, an alarming event involving a 29-year-old student, Danni Morritt, highlighted a rare yet significant flaw. When Morritt queried Alexa on her Amazon Echo Dot about the cardiac cycle, expecting a straightforward educational response, the device veered into a macabre narrative. Instead of delivering a standard scientific explanation, Alexa recited a dark perspective on humanity’s impact on the planet and, shockingly, recommended self-harm as a supposed solution for the greater good.
Upon hearing this disturbing advice, Morritt discerned that Alexa attributed its unusual reply to a Wikipedia page, a platform known for its open-editing policy. Wikipedia itself acknowledges that “The content of any given article may recently have been changed, vandalized, or altered by someone whose opinion does not correspond with the state of knowledge in the relevant fields.” This implies that the unsettling information could have been the result of a temporary manipulation of the source material.
Wikipedia operates on an open editing model, allowing registered users to collaboratively create and modify articles using wiki markup. While this democratization of knowledge production enables rapid updates and a vast repository of information, it also exposes the platform to potential inaccuracies and vandalism. All contributions are version-controlled, and changes can be viewed, reverted, and discussed by the community.
Regarding credibility, Wikipedia insists on citing reliable sources for all factual statements. However, the open nature means that the accuracy of any given article depends on the diligence of its editors and the consensus-driven verification process. Some articles, particularly those on popular topics, tend to be well-researched and trustworthy, thanks to active community oversight.
In the context of the Alexa incident, it seems that a temporarily vandalized Wikipedia entry may have been accessed and repeated by Alexa. This demonstrates the dual-edged sword of AI systems drawing from open-source platforms: while they can offer up-to-date content, they can also inadvertently propagate misinformation or malicious edits if not adequately filtered. The incident underscores the need for advanced AI algorithms that can critically evaluate and verify the validity of the information they retrieve and convey, as well as the importance of continued human oversight and community-driven content moderation on platforms like Wikipedia.
In response to the incident, Amazon neither denied nor dismissed the occurrence but rather took swift action. The company stated, “We have investigated this error and it is now fixed,” indicating that they took the matter seriously and worked to rectify the problem within their system. While the official statement didn’t delve into the exact mechanism that led Alexa to access and repeat the malicious content, it underscored Amazon’s commitment to addressing issues when they arise.
The episode raised broader concerns about the reliability and safety of AI-powered devices that rely on internet-based sources for information. Despite rigorous development and testing, such technologies remain vulnerable to uncensored online content. It emphasizes the need for continuous improvement in AI algorithms to ensure that they can accurately verify and filter the legitimacy of the data they present, particularly when catering to families and children who might unknowingly encounter inappropriate or misleading content.
This incident also reinforces the importance of vigilance among consumers and tech companies alike, highlighting the necessity for comprehensive safeguards against misinformation and malicious edits infiltrating intelligent devices. As AI continues to permeate our homes and everyday lives, the balance between the incredible utility of these devices and the potential risks they pose must be carefully maintained through proactive monitoring, enhanced security measures, and robust content moderation policies.
1. Identify Ethical Issues
Reliance on Dynamic Sources: The core ethical issue revolves around the dependency of AI systems like Alexa on dynamically changing sources, such as Wikipedia, which can be subjected to vandalism or misinformation. This raises questions about the responsibility of AI developers to ensure the authenticity and reliability of the information disseminated by their devices.
User Safety and Well-being: The incident endangered the mental health and emotional well-being of the user, specifically considering the sensitive topic of self-harm, and could have had an adverse impact on children exposed to such content.
Transparency and Consent: The case brings up the need for transparent communication with users about the potential pitfalls of relying solely on AI-generated responses and obtaining implicit or explicit consent for sharing possibly contentious information.
2. Narrow the Focus
Quality Control for Open-Edit Platforms: Focusing on the specific issue of how AI integrations handle content sourced from open-edit platforms, including the processes used to validate, monitor, and update the information.
Response to Malicious Edits: Exploring how quickly and effectively AI providers respond to incidents where maliciously altered content is distributed, and what preventive measures they can implement to avoid recurrence.
3. Identify Relevant and Missing Facts
Detection and Correction Timeline: Determining when the malicious edit occurred on Wikipedia, how long it remained undetected, and the time it took for Amazon to identify and rectify the issue.
Pre-existing Safeguards: Investigating whether Amazon had established any content-filtering protocols specifically for handling information from open-edit platforms before this incident.
Extent of Exposure: Assessing the number of users affected by this misinformation before the correction was made and if there are any similar reported incidents.
4. Make Assumptions
Motivation Behind the Edit: Assuming the Wikipedia edit was a deliberate act of sabotage or a thoughtless prank, and reflecting on the ease with which such incidents can occur on open-source platforms.
Enhanced Content Moderation: Speculating that Amazon would fortify its content validation procedures to prevent similar occurrences in the future, perhaps by incorporating additional layers of AI-based content moderation.
Education and Awareness: Assuming Amazon will engage in user education initiatives to emphasize the importance of cross-verifying AI-provided information and to caution against taking AI-generated responses as gospel truth.
5. Clarify Terminology
Malicious Edits: Content alterations made with the intent to deceive, harm, or provoke an inappropriate response, which can affect AI systems relying on these platforms.
Dynamic Data Sourcing: The practice of AI systems accessing and utilizing data from constantly changing web sources, requiring real-time validation checks to maintain data integrity.
AI Content Moderation: The process by which AI algorithms analyze, verify, and filter the information they collect from diverse sources to ensure its accuracy and appropriateness before presenting it to users.
根据github托管仓库的提交记录,我的这个博客网建于2022/4/10,倒也是马上就要了两周年了,去年这会很忙,倒是没想到做一个一周年回顾,这次就一起补上吧。
近日小小燃起了一下修缮博客的激情,比如加了桌宠,播放器,亚克力风格的卡片,圆角,目录卡片之类的。也奇怪,似乎我就是非常热衷于做这些很游离的事情,做了,会花很多时间,不做也不会怎么样。想说自己还是有颗匠人/艺术家的心,还是很痴迷于这种永远在路上的项目的。做这些可爱的,美美的东西,真的很治愈啊。很多项目,很多科研,换个人,一样做,但博客,模组,辩论这些东西才是真正反映我们内核的东西。