This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; org-html5presentation.el --- HTML5 Presentation export for Org-mode | |
;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 | |
;; Free Software Foundation, Inc. | |
;; Author: Carsten Dominik <carsten at orgmode dot org> | |
;; Keywords: outlines, hypermedia, calendar, wp | |
;; Homepage: http://orgmode.org | |
;; Version: 7.5 | |
;; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; 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 | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'.') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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=[] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
''' | |
@Exaos | |
''' | |
import os | |
import os.path as path | |
import yaml | |
import subprocess as sp |
OlderNewer