I hereby claim:
- I am exaos on github.
- I am vivodo (https://keybase.io/vivodo) on keybase.
- I have a public key whose fingerprint is 39CC FE5D 8738 24A1 6ECB 0210 346A 5402 D477 E89E
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| ''' | |
| @Exaos | |
| ''' | |
| import os | |
| import os.path as path | |
| import yaml | |
| import subprocess as sp |
| (defadvice org-html-paragraph (before fsh-org-html-paragraph-advice | |
| (paragraph contents info) activate) | |
| "Join consecutive Chinese lines into a single long line without | |
| unwanted space when exporting org-mode to html." | |
| (let ((fixed-contents) | |
| (orig-contents (ad-get-arg 1)) | |
| (reg-han "[[:multibyte:]]")) | |
| (setq fixed-contents (replace-regexp-in-string | |
| (concat "\\(" reg-han "\\) *\n *\\(" reg-han "\\)") | |
| "\\1\\2" orig-contents)) |
| #!/usr/bin/env python | |
| import os, os.path | |
| import yaml | |
| baseurl = 'http://geant4.cern.ch/support/source/' | |
| datadir = os.getcwd() + "/../Data/" | |
| urls = yaml.load(open("urls.yaml")) | |
| for k in urls: |
| data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script> |
| # Find ROOT | |
| ifndef ROOTSYS | |
| ROOT_CONFIG := $(shell which root-config 2> /dev/null) | |
| ifdef ROOT_CONFIG | |
| ROOTSYS := $(shell root-config --prefix) | |
| else | |
| missroot:: | |
| @echo "ROOT system is not found!" | |
| endif | |
| else |
| #!/usr/bin/env python | |
| ''' | |
| ''' | |
| from ROOT import TH1F, TH1, TSpectrum, TFile | |
| from pprint import pformat | |
| def get_gpeaks(h,lrange=[1000,3800],sigma=2,opt="",thres=0.05,niter=20): | |
| s = TSpectrum(niter) | |
| h.GetXaxis().SetRange(lrange[0],lrange[1]) |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| '''Read data acquired by MCA8000A through software "pcma". | |
| File extension: .mca''' | |
| import re | |
| def readmca(fm): | |
| sraw=[l.strip() for l in open(fm,'r').readlines()] | |
| kidx=[] |
| import shutil, os, sys | |
| def dest_name(d_name): | |
| d_tmp = d_name.split('-') | |
| if d_tmp and d_tmp[0] != d_name: | |
| return os.path.join('.',*d_tmp) | |
| return None | |
| names = os.listdir(ur'.') |
| ;; mode: emacs-lisp; coding: utf-8 | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ;; By: Exaos Lee | |
| ;; URL: https://gist.github.com/4493582 | |
| ;; References: | |
| ;; - http://baohaojun.github.com/perfect-emacs-chinese-font.html | |
| ;; - http://fonts.jp/hanazono/ | |
| ;; - http://ergoemacs.org/emacs/emacs_n_unicode.html | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |