Skip to content

Instantly share code, notes, and snippets.

View xiaofeima1990's full-sized avatar

xiaofeima xiaofeima1990

  • UIBE
  • Beijing
View GitHub Profile
@xiaofeima1990
xiaofeima1990 / Word排版.md
Created February 26, 2025 17:26
[MS Office] MS office 使用技巧,格式排版等 #Office

Source

链接:https://www.jianshu.com/p/e8d263efe7f7

Format 格式

title: 更改题注的序号
选定题注中的编号,点右键,选切换域代码,按如下格式更改 `{SEQ 图表 \r 2 \* ARABIC}`,这只是个示例,根据你的情况更改,改完后点更域即可!  
@xiaofeima1990
xiaofeima1990 / Important Packages.md
Last active February 26, 2025 15:46
[Python Packages] important packages #Python
  • pip3-autoremove > usage pip-autoremove -y -e jupyterlab to remove packages including their extra packages (recursive).
@xiaofeima1990
xiaofeima1990 / article_note_templatesCN.yaml
Last active February 26, 2025 14:57
[Zotero] Zotero related templates, resources #yaml
name: '[item]论文笔记'
text: "<!-- 标题 -->\n<h1 style=\"color:#193c47; background-color:#eef9fd; padding:8px;\">\n ${(() => {\n const date = topItem.getField(\"date\").split('T')[0];\n const title = topItem.getField(\"title\");\n const titleTranslation = topItem.getField(\"titleTranslation\");\n if (date && titleTranslation) {\n return `(${date}) ${title} (${titleTranslation})`;\n } else if (date) {\n return `(${date}) ${title}`;\n } else {\n return `${title}`;\n }\n })()}\n</h1>\n\n<!-- Meta Data -->\n<table>\n <!-- 作者 -->\n <tr>\n <td style=\"color:#193c47; background-color:#dbeedd; padding:8px;\">\n <b>作者:</b> ${topItem.getCreators().slice(0, 10).map((v) => v.firstName + \" \" + v.lastName).join(\"; \") + (topItem.getCreators().length > 10 ? \"; et al.\" : \";\")}\n </td>\n </tr>\n\n <!-- 期刊 -->\n <tr>\n <td style=\"color:#193c47; background-color:#f3faf4; padding:8px;\">\n <b style=\"color:#193c47;\">期刊: \n <b style=\"color:#FF0000\">\n
@xiaofeima1990
xiaofeima1990 / get_stock_info_from_sina.py
Last active February 26, 2025 15:55
[Financing Analysis Coding System]
#! /usr/bin/python3
# coding=utf-8
'''
在水木上看到有人在问到想用python去获取股票的信息,sina finance上面的那些数据的是通过js控制的,会根据股票代码去获取实时信息然后根据用户友好的方式展示出来。
首先,新浪的一个url让我们可以获取股票的信息:http://hq.sinajs.cn/?list=sh600000
然后,我简单写了个程序可以将其中有用的股票名称/当前价格/涨跌幅等信息提取出来。本来是不难的,只是在数字的处理和格式化输出这两方面,我还找了些资料看了下才实现了。
实现的输出如下:
—————————————————————
股票名称:超图软件 涨跌幅:2.07 最新价:22.73
股票名称:浪潮信息 涨跌幅:-2.91 最新价:19.33
@xiaofeima1990
xiaofeima1990 / article_template.tex
Last active February 26, 2025 15:49
[Latex templates] #latex
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\title{Laplace Transform Intuition:\\What makes it so useful, and how you can ``invent" it from scratch}
\author{Evan Allen}
\date{April 2019}
\usepackage{natbib}
\usepackage{graphicx}
@xiaofeima1990
xiaofeima1990 / R-apply-lapply-sapply.md
Last active February 26, 2025 14:49
[R Basic Tutorial] #R

apply() function

We use apply() over a matrice. This function takes 5 arguments:

apply(X, MARGIN, FUN)
Here:
-x: an array or matrix
-MARGIN:  take a value or range between 1 and 2 to define where to apply the function:
-MARGIN=1`: the manipulation is performed on rows
-MARGIN=2`: the manipulation is performed on columns
-MARGIN=c(1,2)` the manipulation is performed on rows and columns
@xiaofeima1990
xiaofeima1990 / Bibliography setup.md
Last active February 26, 2025 14:42
[Latex] #latex

For bibtex/Natbib, use the old year and month fields instead of date.
If you prefer to use the date field, switch from bibtex to biblatex. Biblatex not only supports the superior date field, but is also much more flexible and easier to customize.

But notice that Biblatex is incompatible with backref. This is impossible to deal with under Lyx. In latex, you can try:

\documentclass{scrbook}
\usepackage[natbib=true,style=ieee,backref=true]{biblatex}%<--- add here 
\usepackage{hyperref}%&lt;---- instead of here
@xiaofeima1990
xiaofeima1990 / show_hidden_file.md
Created May 12, 2019 23:25
[mac OS Technique] #mac

Show all hidden files

defaults write com.apple.finder AppleShowAllFiles TRUE

Hide all hidden files

defaults write com.apple.finder AppleShowAllFiles FALSE

In both actions, Finder needs to be restarted through:

killall Finder