Zheng Chu's Blog

让希望永驻


  • 主页

  • 所有专栏

  • 历史文章

  • 标签

  • 关于我

GolangNote

Posted on 2020-05-08 Edited on 2020-12-06 In Go

基本语法

:=

Inside a function, the := short assignment statement can be used in place of a var declaration with implicit type.

Outside a function, every statement begins with a keyword (var, func, and so on) and so the := construct is not available.

Read more »

VSCode学习记录

Posted on 2020-04-08 Edited on 2020-12-06 In 效率

VSCode学习记录

快捷键

  1. 按下ctrl+P,弹出搜索栏,直接输入关键字,在所有文件中搜索特定符号:在搜索栏前输入”@“,在当前文件中搜索特定符号;在搜索栏前输入”>“,搜索所有可使用的命令。
  2. 通过ctrl+=和ctrl+-组合来进行缩放。
  3. 按下Ctrl+Shift+P打开命令盘,键入new file,按下回车,也可以编辑一个新文件
  4. 快捷键Ctrl+O;在命令盘中键入file:open folder
  5. 输入 configure language, 选择Configure Display Language (配置显示语言)
  6.  >create:new file
Read more »

一些算法题解

Posted on 2020-04-08 Edited on 2020-12-06 In Algorithm

最长上升公共子序列

  • 最长公共子序列(longest common sequence):
    • 当$a(x) \neq b(y)$ 时,$f(x, y) = \max(f(x-1, y), f(x, y))$
    • 否则:$f(x, y) = f(x-1, y - 1) + 1$
  • 最长上升子序列(longest increasing sequence):
    • 对于$a(i) < a(k)$ ,$i=1,2,…,k-1$时,有$f(k) = max(1, f(i) + 1)$
    • 否则$f(k) = max(f(k), 1)$
Read more »

python_plot

Posted on 2020-04-08 Edited on 2020-12-06 In python

单图

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import numpy as np
import matplotlib.pyplot as plt

# plt.figure(figsize=(80, 40))

# plt.subplot(241)

plt.rcParams['figure.figsize'] = (40, 40) # 设置figure_size尺寸
plt.rcParams['image.interpolation'] = 'nearest' # 设置 interpolation style
plt.rcParams['image.cmap'] = 'gray' # 设置 颜色 style

#figsize(12.5, 4) # 设置 figsize

plt.rcParams['savefig.dpi'] = 300 #图片像素
plt.rcParams['figure.dpi'] = 300 #分辨率
ax = plt.gca() #gca 'get current axes' 获取图像的边框对象==

ax.spines['right'].set_color('none')
ax.spines['top'].set_color('none')
x = [0.01,0.02, 0.03,0.04,0.05,0.06,0.07,0.08,0.09,0.1]
y = [0.5997,0.6728,0.7119,0.7219,0.7317,0.7400,0.7528,0.7618,0.7695,0.7684]
y1=[0.5699,0.6080,0.6410,0.6672,0.6900,0.7077,0.7108,0.7217,0.7284,0.7395]
y2=[0.5578,0.5879,0.6197,0.6454,0.6661,0.6832,0.6954,0.7007,0.7149,0.7205]
y3=[0.6153,0.6430,0.6738,0.6977,0.7139,0.7266,0.7300,0.7434,0.7506,0.7600]
y4=[0.7183,0.7303,0.7533,0.7639,0.7658,0.7714,0.7857,0.7876,0.7888,0.7899]
plt.tick_params(labelsize=35)
labels = ax.get_xticklabels() + ax.get_yticklabels()
[label.set_fontname('Calibri') for label in labels]
[label.set_fontweight('bold') for label in labels]
font1 = {'family' : 'Calibri',
'weight' : 'bold',
'size' : 40,
}
font2 = {'family' : 'Calibri',
'weight' : 'bold',
'size' : 47,
}
plt.rcParams['xtick.direction'] = 'in'
plt.rcParams['ytick.direction'] = 'in'
ax.set_xlim(0,0.11)
ax.set_xticklabels( ('0', '0.02', '0.04', '0.06', '0.08','0.1'))
ax.set_ylim(0.55,0.8)

#ax.set_yticklabels( ('0.55', '0.6', '0.65', '0.7', '0.8'))

plt.plot(x, y, marker='^',label=u'deepwalk',lw=8,ms=14)
plt.plot(x, y1, marker='*',label=u'sdne',lw=8,ms=19)
plt.plot(x, y2, marker='h',label=u'line',lw=8,ms=14)
plt.plot(x, y4, marker='s',label=u'GIC2Gauss',lw=8,ms=14)
plt.plot(x, y3, marker='p',label=u'G2G_oh',lw=8,ms=17)

plt.legend(prop=font1,edgecolor='black',loc = 4) # 让图例生效
plt.margins(0)
plt.subplots_adjust(bottom=0.15)
plt.xlabel(u"Percentage of labeled nodes",font1) #X轴标签
plt.ylabel("Micro F1",font1) #Y轴标签

#plt.text(-10,-10,t, wrap=True)

plt.title("Cora",font2) #标题

plt.subplots_adjust(top=0.975,bottom=0.045,left=0.025,right=1,hspace=0.25,wspace=0.15)

#plt.savefig('E:\classification.svg',format='svg',dpi=300)

plt.show()
Read more »

图卷积神经网络研讨会笔记

Posted on 2020-04-08 Edited on 2020-12-06 In Deeplearning

地址:https://www.bilibili.com/video/BV1zp4y117bB/?p=1

图卷积神经网络—中科院沈华伟老师

The power of CNN lies in : 优势是平移不变性(translation- or shift-invariant):识别目标独有的特征,尽管其特征的空间位置发生变化。

Read more »

Actual Speaking

Posted on 2020-04-08 Edited on 2020-12-06 In English

Actual Speaking

LESSON 3:occupation

ads https://www.bilibili.com/video/BV1fE411R7qZ?p=3

句子:

I’ ve got fingers in lots of different pies.

I do like what I do.

I absolutely loved it.

I think in any walk of life, you like some people, you don’t like some people, but I’ m fortunate enough

I was getting paid to learn. I was reading about the news, current events and I was learning about the world while I was getting paid to do it.

I don’t think there are too many people who are like us. Maybe people watching this will be saying, “I hate my job”, but just stick with it, and something will come of it.

Read more »

English Grammar

Posted on 2020-03-27 Edited on 2020-12-06 In English

Determiners

BASIC RULES

  • The + Noun : To say “you know which I mean”
  • Contrariwise, a/an + singular countable noun. 这类名词一定得配上冠词或限定词使用~
  • NO Articles before plural noun / uncountable noun.
  • Don’t use the to talk about things in general. Like “Elephants can swim very well”
Read more »

IELTS WRITING NOTE

Posted on 2020-03-21 Edited on 2020-12-06 In English

PART ONE : 150-185 words at least.

  • Remember: No conclusion. Instead write a summary(the overview).

  • Type 1 to 4 are more common, its related to numbers in ways of describe, compare, changes, trends.

  • Essays structure composed by 4 paragraphs:

      1. Introduction: 1 sentence to paraphrase the question.
      1. Overview: 2 setences about the main, general things.
      1. Details. 3 + 4 sentences for details.
      1. Details
Read more »

Edison Chen Interview

Posted on 2020-03-13 Edited on 2020-12-06

Edison Chen Interview

In the initial, I was just a star and a manager told me what to do every day. And one night, i was actually sold - like I was sold to another company. It was very demeaning to me and I felt very helpless. I felt like I was not in control of anything.

One a very important thing is that when I started being an actor or an entertainer in Hong Kong. People would always be making fun of the way i dress. And people would always be making fun of the way that I spoke or the way I stood.

I think hip-pop wasn’t such a big thing in the late nineteenth, early two thousands in Asia.

So at that moment, I was wondering why they wouldn’t understand what it was that we were doing. At the same time, in the American market there is a huge gap of high-quality Chinese products or high-quality Chinese creativity.

So what we wanted to do was to bring the people that we loved and supported so dearly to China, and showcase these people.

But at the same time, being able to work with them and collaborate with them, and exchange creative ideas, so that we can be the same level. That’s the most important point, for us, it was to be recognized by people all around the world, that we are a Chinese band, but we’re fly too.

We are now actually working on some projects with Polo and with Ralph Lauren. I think it’s a sign of the times, you know.

So I really feel like the youths in China really need to open their eyes and realize that the world is within their grasp.

They just need to believe that they can get it.

Belif is something that is lacking with the youths of China.

They always like to watch and enjoy, but they need to work hard and persevere and excel.

I always tell this. In every place of the world, there are rules and regulations, not even in China, in America, in Europe- in everywhere. But in a creative world, there is no rule, there is no limit. The world is yours, your mind can expands anywhere.

So you need to use that freedom in your everyday struggles.

Now, when they watch these hip-pop videos and they see the street culture stuff, they’re kind of like, “Wow, this is so fresh now, i like it.”

Why do you like it? They might not even know why they like it.

It’s because it represents something that they lack, that is to be able to think openly and be like, i can do this, and i will do this.

Joaquin Phoenix won the Best Actor

Posted on 2020-02-13 Edited on 2020-12-06

[We have to] continue to use our voice for the voiceless.

I’ve been thinking a lot about some of the distressing issues that we are facing collectively.

I think at times we feel, or were made to feel, that we champion different causes, but for me, I see commonality.

I think, whether we’re talking about gender inequality or racism or queer rights or indigenous rights or animal rights, we’re talking about the fight against injustice.

We’re talking about the fight against the belief that one nation, one people, one race, one gender or one species has the right to dominate, control and use and exploit another with impunity.

I think that we’ve become very disconnected from the natural world, and many of us, what we’re guilty of is an egocentric worldview — the belief that we’re the center of the universe.

We go into the natural world, and we plunder it for its resources.

We feel entitled to artificially inseminate a cow, and when she gives birth, we steal her baby, even though her cries of anguish are unmistakable. Then, we take her milk, that’s intended for her calf, and we put it in our coffee and our cereal, and I think we fear the idea of personal change because we think that we have to sacrifice something to give something up.

But human beings, at our best, are so inventive and creative and ingenious, and I think that when we use love and compassion as our guiding principles, we can create, develop and implement systems of change that are beneficial to all sentient beings and to the environment.

Now, I have been a scoundrel in my life. I’ve been selfish. I’ve been cruel at times, hard to work with and ungrateful, but so many of you in this room have given me a second chance.

And I think that’s when we’re at our best, when we support each other, not when we cancel each other out for past mistakes, but when we help each other to grow, when we educate each other, when we guide each other toward redemption.

That is the best of humanity.

When he was 17, my brother wrote this lyric. It said,

‘Run to the rescue with love, and peace will follow.’

<1…456…9>
Zheng Chu

Zheng Chu

90 posts
20 categories
25 tags
GitHub 简书 CSDN E-Mail
© 2021 Zheng Chu
Powered by Hexo v4.2.1
|
Theme – NexT.Pisces v7.3.0
|