ARTS-Week-01

每周完成一个ARTS: 每周至少做一个 leetcode 的算法题、阅读并点评至少一篇英文技术文章、学习至少一个技术技巧、分享一篇有观点和思考的技术文章。(也就是 Algorithm、Review、Tip、Share 简称ARTS)

1.Algorithm

Two Sum

Given an array of integers, return indices of the two numbers such that they add up to a specific target.

You may assume that each input would have exactly one solution, and you may not use the same element twice.

Example:

1
2
3
4
Given nums = [2, 7, 11, 15], target = 9,
Because nums[0] + nums[1] = 2 + 7 = 9,
return [0, 1].
1
2
3
4
5
6
7
8
9
10
11
12
13
14
class Solution(object):
def twoSum(self, nums, target):
"""
:type nums: List[int]
:type target: int
:rtype: List[int]
"""
d = {}
for i, num in enumerate(nums):
# check if num is in the hash map
if num in d:
return [d[num], i]
# (target - num) means what number I want to be added to get the target
d[target - num] = i

2.Review

可以翻译,锻炼自己的阅读和英语能力。

英文文章可以去自己想要学习的技术官网获取,或者自己喜欢的公司 blog

Using sk-learn to analyze SQL Injection

http://nbviewer.ipython.org/url/raw.github.com/ClickSecurity/data_hacking/master/sql_injection/sql_injection.ipynb

[原创翻译] 使用机器学习方法分析SQL注入

https://www.t00ls.net/thread-50411-1-1.html

3.Tip

生活技巧,学习技巧、工具

Tex & Markdown

如何在Markdown中插入数学公式

Markdown支持Tex语法插入数学公式

  • 行内公式 $ ... $
  • 行间公式 $$ ... $$

常用Command:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
\(空格) 词间空格
\sum_{i=0}^{n} 求和符号
^{上标}
_{下标}
\frac{x+y}{2} 分式
\alpha
\\ 换行
\times 乘号
矩阵
\left[
\begin{matrix}
0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 \\
0 & w & 0 & 0
\end{matrix}
\right]

更多:

http://docs.mathjax.org/en/latest/tex.html#supported-latex-commands

4.Share

[原创翻译] 使用机器学习方法分析SQL注入

https://www.t00ls.net/thread-50411-1-1.html

小明 wechat
欢迎您扫一扫上面的微信公众号,订阅我的博客!
0%