Seen season 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
with settings(host_string="[email protected]:7491"): | |
run("ls") |
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
#+NAME: test | |
#+BEGIN_SRC C | |
int main(int argc, char *argv[]) { | |
printf("test\n"); | |
return 0; | |
} |
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
(if (equal major-mode 'dired-mode) | |
(save-excursion | |
(goto-char (point-max)) | |
(format "(%d files)" (- (line-number-at-pos) 5)))) | |
;; -5 is a hack, but I think it will actually always work since dired requires -al at a minimum. |
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
fun mytake n ls = if n = 0 orelse ls = nil then nil | |
else hd(ls)::mytake (n-1) tl(ls); |
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
(bind-key "C-n" (lambda() | |
(interactive) | |
(if (boundp 'foo) | |
(message "yay foo") | |
(next-line))) dired-mode-map) |
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
class Foo: | |
count = 0 | |
def __init__(self, count): | |
self.count = count | |
elements = [Foo(5), Foo(2), Foo(4), Foo(1)] | |
elements.sort(key=lambda x: x.count) |
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
(use-package python | |
:commands python-mode | |
:config (progn | |
(setq pylint:epylint-executable "epylint" | |
python-shell-interpreter "ipython" | |
python-shell-interpreter-args "-i" | |
python-shell-buffer-name "Python" | |
python-shell-prompt-regexp "In \\[[0-9]+\\]: " | |
python-shell-prompt-block-regexp ":" | |
python-shell-prompt-output-regexp "Out\\[[0-9]+\\]: ") |
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
def sort(l): | |
for i in xrange(1, len(l)): | |
val = l[i] | |
j = i - 1 | |
while j >= 0 and l[j] > val: | |
l[j+1] = l[j] | |
j -= 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
970 2012-12-14 12:42:25 | |
971 2012-12-14 13:17:15 | |
972 2012-12-14 13:37:52 | |
976 2012-12-14 13:54:27 | |
978 2012-12-14 14:39:01 |