Skip to content

Instantly share code, notes, and snippets.

View YT-er's full-sized avatar
👨‍💻
working

YT-er

👨‍💻
working
View GitHub Profile
@YT-er
YT-er / vscode.md
Last active January 17, 2019 02:47
vscode设置

VScode设置

{
    "workbench.colorTheme": "Atom One Light",
    "workbench.iconTheme": "vscode-icons",
    "code-runner.executorMap": {
        "javascript": "node",
        "java": "cd $dir && javac $fileName && java $fileNameWithoutExt",
        "c": "cd $dir && gcc $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
@YT-er
YT-er / spider.md
Last active January 17, 2019 09:26
scrapy的一些问题记录

Scrapy记录

20190116

start_urls

start_urls是必须的,而且要是list形式,哪怕只有1个,它是Spider类的默认属性。

json输出中文

settings.py里设置

@YT-er
YT-er / linux.md
Last active January 21, 2019 03:03
linux常用命令及技巧

Linux常用命令

删除文件前100行

sed -i "1,100d" filename

在文件最前面插入一列序号

@YT-er
YT-er / note.md
Last active March 7, 2019 07:25
随时记录问题和结果

每天有点小疑问

20190110

Q:assert是什么?

A:python assert断言是声明其布尔值必须为真的判定,如果发生异常就说明表达示为假。可以理解assert断言语句为raise-if-not,用来测试表示式,其返回值为假,就会触发异常。

assert expression
@YT-er
YT-er / code.md
Last active January 15, 2019 06:08
放代码片

代码片

utf头注释

	"utf file header": {
		"prefix": "utf",
		"body": [
		  "# -*- coding: utf-8 -*-",
			"",