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/env python | |
# | |
# Copyright 2007 Google Inc. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
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
#-*- Mode:sh -*- | |
#!/bin/sh | |
listindex=`head -n 1 "$HOME/.plait/status"` | |
np=`awk '{if(NR==n) print $0}' n=$listindex $HOME/.plait/plaiter.m3u` | |
np=${np#"/home/artagnon/music"/} | |
artist=${np%%/*} # First string before / | |
track=${np##*/} # Last string after / | |
track=${track%%.*} # remove extension | |
track=${track#* } # remove number | |
perl $HOME/bin/LeoLyrics.pm "$artist" "$track" |
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/perl | |
package Lyrics::Fetcher::LeosLyrics; | |
our $VERSION = 0.02; | |
# Copyright (c) 2007 Edward Allen III. Some rights reserved. | |
# | |
## This program is free software; you can redistribute it and/or | |
## modify it under the terms of the Artistic License, distributed | |
## with Perl. | |
# |
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
;; Reformat hard-wrapped regions | |
(defun reformat-hard-wrap (beg end) | |
(interactive "r") | |
(shell-command-on-region beg end "fmt -w2000" nil t)) |
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
normalize <- function (m) { | |
result <- m | |
for (r in 1:dim (m)[1]) { | |
avg <- mean (m [r,], na.rm=TRUE) | |
variance <- var (m [r,], na.rm=TRUE) | |
result [r,] <- result [r,] - avg | |
result [r,] <- result [r,] / sqrt (variance) | |
} | |
return (result) | |
} |
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
((defmacro define-new-c-style (name derived-from style-alists tabs-p path-list) | |
`(progn | |
(add-hook 'c-mode-common-hook | |
(lambda () | |
(c-add-style ,name | |
'(,derived-from (c-offsets-alist | |
,style-alists))))) | |
(add-hook 'c-mode-hook | |
(lambda () | |
(let ((filename (buffer-file-name))) |
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
; ModuleID = 'dumb.cpp' | |
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" | |
target triple = "x86_64-apple-macosx10.10.0" | |
; Function Attrs: ssp uwtable | |
define i32 @main() #0 { | |
entry: | |
%retval = alloca i32, align 4 | |
%Dumb = alloca i32*, align 8 | |
store i32 0, i32* %retval, align 4 |
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 | |
VERSION_pyjnius_testing= | |
URL_pyjnius_testing=https://github.com/kivy/pyjnius/archive/extend_class_support.zip | |
DEPS_pyjnius_testing=(python) | |
MD5_pyjnius_testing= | |
BUILD_pyjnius_testing=$BUILD_PATH/pyjnius/$(get_directory $URL_pyjnius_testing) | |
RECIPE_pyjnius_testing=$RECIPES_PATH/pyjnius_testing | |
function prebuild_pyjnius_testing() { |
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
;; Cython mode | |
;; Load python-mode if available, otherwise use builtin emacs python package | |
(when (not(require 'python-mode nil t)) | |
(require 'python)) | |
(add-to-list 'auto-mode-alist '("\\.pyx\\'" . cython-mode)) | |
(add-to-list 'auto-mode-alist '("\\.pxd\\'" . cython-mode)) | |
(add-to-list 'auto-mode-alist '("\\.pxi\\'" . cython-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
def process!(body) | |
htmlescape_rules = { | |
"&" => "&", | |
"\"" => """, | |
"'" => "'", | |
"<" => "<", | |
">" => ">" | |
}.freeze | |
paragraph_types = [:plain, :emailquote, :codeblock, :header, :footer] |
OlderNewer