Most Commonly Used Python Data Structures that are NOT built-in

This blog will introduce deque, bisect, defaultdict, Counter, OrderedDict, heapq. For every data structure, I’ll introduce their basic knowledge, example code and LeetCode problems. The four basic inbuilt data structures (Lists, Dictionary, Tuple, and Sets) can be learned from GeeksforGeeks.

Of course, this blog won’t cover all useful functions or data structures. I’ll update this article when I find more useful data structures.

Read More »

Plot Graph to Show Ideas - Installation and Scatter Plot

When we do experiments to observe or demonstrate some ideas, one graph can produce a correct intuition if you use a proper graph. For example, if you want to observe the distribution of data, the bar or line graphs are not sufficient to show this information. Because they can only show the average and variance of data. If the data is plotted by the violin or CDF (cumulative distribution function), they will show the distribution of data in a better way.

Of course, how to visualize data is not easy work and I’m not a profession here. I just want to introduce 1) how to plot some general graphs by Python3 (Matplotlib package); 2) these graphs are suited to which situations.

If you know better references, please feel free to send them to me by Email. (zurielibra@gmail.com)

More examples of data visualization can be found on the website of Matplotlib.

Read More »

Create New User with Temporary Password on Linux

  1. Create new user and home directory
1
> useradd -m USERNAME

-m option is used to create the user’s home directory if it does not exist.

If you want to specify the path of the home directory, use -d and specify the path:

1
> useradd -m -d /PATH/TO/FOLDER USERNAME
  1. Set temporary password for new user
1
> passwd USERNAME
  1. Change password expiration information
1
> chage -d 0 USERNAME

-d option is used to set the number of days since January 1st, 1970 when the password was last changed.

Read More »

996,996

996, 996
996 的码农写着代码
996 的司机开着出租
996 的医生做着手术
996 的老板拉着关系

9点应酬的老板用996码农的程序叫了996的司机
996的司机一个瞌睡撞上了996的土方车
996的医生抢救着让员工996的老板
996的老板被996的医生治死在手术台

996 的匣子被谁开启
996 的丧钟为谁而鸣
996 的ICU为所有人敞开

友情链接:https://996.icu

人类未来疆域展望

无数科幻小说已经想象过未来人类在宇宙中的足迹。在早期科幻中,作者们幻想人类可以以任意速度在空间中飞行。在爱因斯坦相对论得到广泛认可后,飞船或通过虫洞的类似方式移动, 或利用人体冬眠度过漫长的亚光速旅途。在小说中,一个国家的疆域基本是以星系为单位,光年为尺度。但是在真实世界中,一个人类国家的版图真的可能这么大吗?在后续的文章中,我将基于人类已有的历史推测出未来可能的最大国土面积。

Read More »

ACM PADS poster

You can download PDF version of poster by

https://drive.google.com/open?id=10--SnwxmsJIAVM5Sd-nI7DYMHfnngZTY

The slides for poster presentation is available by

https://drive.google.com/open?id=1KrrHToZ7_adhCBYkbptjTd1V15hDnqzR

I suggest you to open this slides by powerpoint on MacOS.

This poster is the following work for paper “Virtual-Time-Accelerated Emulation for Blockchain Network and Application Evaluation”. You can also access this paper by google scholar.

PADS19_poster