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
""" | |
The MIT License (MIT) | |
Copyright (c) 2015 Alec Radford | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
Based on this blog.
This guide shows you how to setup emacs to render a README.md very similarly to how github will do it; except it also works offline. There are no dependencies that can't be easily installed via the package manager on ubuntu.
- Install emacs24, the markdown mode, and pandoc. You may need the packages
emacs
,emacs-goodies-el
, andpandoc
. - Get a style sheet that resembles the github style from this gist and store it. I put it in
~/emacs.d/github-pandoc.css
.
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
# Two very basic functions for searching just the input code of an IPython notebook | |
# Written because I often want to search notebooks for snippets but the giant output | |
# of embedded encoded images makes it difficult. | |
# Ipython's nbconvert can be used to extract just the input, but this requires | |
# writing to a separate file and can be quite slow when used with large notebooks. | |
# Additionally, find/xargs can be used with igrep when the name of the notebook isn't known. | |
# icat could be used to convert an IPython notebook to a standard python file if | |
# the notebook does not contain whole-cell magics. |
This file has been truncated, but you can view the full file.
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
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Chebfun in Python" | |
] | |
}, | |
{ |
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
// ==UserScript== | |
// @id scopus-doi-linker | |
// @name Scopus DOI Linker | |
// @version 1.0 | |
// @namespace pfenninger.org | |
// @author Stefan Pfenninger | |
// @description Adds hyperlinks to DOIs on Scopus preview pages | |
// @homepage http://pfenninger.org/ | |
// @match http://www.scopus.com/* | |
// @match http://*.scopus.com/* |
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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; diff-region* - Diff two regions | |
;; | |
;; To compare two regions, select the first region | |
;; and run `diff-region`. The region is now copied | |
;; to a seperate diff-ing buffer. Next, navigate | |
;; to the next region in question (even in another file). | |
;; Mark the region and run `diff-region-now`, the diff | |
;; of the two regions will be displayed by ediff. | |
;; |
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
Bitly tech talk 4/22/2010 | |
On 4/22 we held a bit.ly tech talk on 'Command Line Fu', where we invited talented hackers to come share their best moves. Please correct my notes and add your fu here! | |
# @jehiah | |
# in place file regex replacement | |
perl -pi -e 's/this/that/g' filename_pattern | |
# print the last column of a file ($NF stands for 'Number of Fields' or more commonly Last Field). |
NewerOlder