Skip to content

Instantly share code, notes, and snippets.

@semio
semio / isin_to_a.py
Last active January 4, 2019 09:42
将msci A股指数成份列表的ISIN转为A股代码..
import pandas as pd
import requests as req
path_to_china_a_constituents = './China_A_constituents_FINAL-Aug2018.xlsx'
df = pd.read_excel(path_to_china_a_constituents, sheet_name='China A Inclusion', skiprows=4)
res = []
for n in df['ISIN']:
@semio
semio / recipe_example.yml
Last active May 20, 2019 06:55
DDF Recipe Example
info:
id: ddf--your_company--oil_per_person
author: your_company
version: v1
license: MIT
language: en
base:
- ddf--gapminder--population
- ddf--gapminder--geo_entity_domain
- ddf--bp--energy
@semio
semio / org-jekyll-mode.el
Last active August 29, 2015 14:23
org-jekyll-mode.el
;; org-jekyll-mode -- is a minor mode, which help to export org-mode file
;; as an jekyll-formatted html.
;;
;;
;; Copyright (C) 2012-2014 Tang Ling
;;
;; Author: Tang Ling (http://jsuper.github.io)
;; URL: http://github.com/jsuper/org-jekyll-mode
;; GIT: http://github.com/jsuper/org-jekyll-mode
;;
@semio
semio / functions.sh
Last active December 10, 2015 03:18
some shell functions
# Compare svn versions and zip the changed files.
# usage: svnecf tarfile start_rev end_rev
# credit: http://code.davelens.be/blog/detail/svn-export-all-changed-files-between-two-revisions-in-a-tarball
function svnecf()
{
tarfile=$1
start_rev=$2
end_rev=$3
if [[ "$end_rev" == "" ]]; then