Created from the plain text reference card on orgmode.org Download this file, and open it in Emacs org-mode!
This file contains 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
;;; resize-frame.el --- A minor mode to resize frames easily. -*- lexical-binding: t; -*- | |
;; Copyright (C) 2014 kuanyui | |
;; Author: kuanyui <[email protected]> | |
;; Keywords: frames, tools, convenience | |
;; License: WTFPL 1.0 | |
;;; Commentary: |
This file contains 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
#!/bin/bash | |
# Here are some embedded Python examples using Python3. | |
# They are put into functions for separation and clarity. | |
# Simple usage, only using python to print the date. | |
# This is not really a good example, because the `date` | |
# command works just as well. | |
function date_time { |
This file contains 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
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:c81db9b3da9f1e569785e363228b8b51d0b00b179b4637f15817ef495a5a5286" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |
import pandas as pd
import numpy as np
from tabulate import tabulate
df = pd.DataFrame(np.random.random((4,3)), columns=['A','B','C'])
print("foo")
return(tabulate(df, headers="keys", tablefmt="orgtbl"))
This file contains 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
def parse_orgtable(s): | |
"""Parse an org-table (input as a multiline string) into a Pandas data frame.""" | |
# This didn't quite work, because spaces messed things up | |
#import cStringIO | |
#table = pd.read_table(cStringIO.StringIO(s),sep='|',skiprows=[1],skipinitialspace=True) | |
#table = table.drop(table.columns[[0,-1]],1) | |
# I suppose I could have simply run strip() on all of the resulting column names, since that was the problem | |
def parseline(l): | |
w = l.split('|')[1:-1] | |
return [wi.strip() for wi in w] |
This file contains 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
;; reftex in markdown mode | |
;; if this isn't already set in your .emacs | |
(setq reftex-default-bibliography '("/path/to/library.bib")) | |
;; define markdown citation formats | |
(defvar markdown-cite-format) | |
(setq markdown-cite-format | |
'( | |
(?\C-m . "[@%l]") |
OlderNewer