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
-- Parsec 3 tutorial code -- | |
-- module Main where -- this isn't necessary | |
import Text.Parsec | |
import Text.Parsec.String (Parser) -- type Parser = Parsec String () | |
import Text.Parsec.Expr | |
import qualified Text.Parsec.Token as P | |
import Text.Parsec.Language (haskellStyle) | |
import Data.Char |
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
# pure-Python Douglas-Peucker line simplification/generalization | |
# | |
# this code was written by Schuyler Erle <[email protected]> and is | |
# made available in the public domain. | |
# | |
# the code was ported from a freely-licensed example at | |
# http://www.3dsoftware.com/Cartography/Programming/PolyLineReduction/ | |
# | |
# the original page is no longer available, but is mirrored at | |
# http://www.mappinghacks.com/code/PolyLineReduction/ |
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
#!/usr/bin/python2 | |
# Copyright (C) 2016 Sixten Bergman | |
# License WTFPL | |
# | |
# This program is free software. It comes without any warranty, to the extent | |
# permitted by applicable law. | |
# You can redistribute it and/or modify it under the terms of the Do What The | |
# Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See |
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
#compdef hg | |
# Zsh completion script for mercurial. Rename this file to _hg and copy | |
# it into your zsh function path (/usr/share/zsh/site-functions for | |
# instance) | |
# | |
# If you do not want to install it globally, you can copy it somewhere | |
# else and add that directory to $fpath. This must be done before | |
# compinit is called. If the file is copied to ~/.zsh.d, your ~/.zshrc | |
# file could look like this: |
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
; A REPL-based, annotated Seesaw tutorial | |
; Please visit https://github.com/daveray/seesaw for more info | |
; | |
; This is a very basic intro to Seesaw, a Clojure UI toolkit. It covers | |
; Seesaw's basic features and philosophy, but only scratches the surface | |
; of what's available. It only assumes knowledge of Clojure. No Swing or | |
; Java experience is needed. | |
; | |
; This material was first presented in a talk at @CraftsmanGuild in | |
; Ann Arbor, MI. |
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
import os | |
from docutils import nodes | |
from docutils.parsers.rst import directives | |
from docutils.parsers.rst.directives.images import Image | |
def find_image(path, filename): | |
fname = os.path.join(path, filename) | |
if os.path.exists(fname + '.pdf'): | |
return fname + '.pdf' |
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
;;; minimial-cedet-config.el --- Working configuration for CEDET from bzr | |
;; Copyright (C) Alex Ott | |
;; | |
;; Author: Alex Ott <[email protected]> | |
;; Keywords: cedet, C++, Java | |
;; Requirements: CEDET from bzr (http://cedet.sourceforge.net/bzr-repo.shtml) | |
;; Do checkout of fresh CEDET, and use this config (don't forget to change path below) |