| language | filename |
|---|---|
hy |
learn-hy.hy |
;; this gives an gentle introduction to hy for a quick trial head to
;; try-hy.appspot.com
;;| language | filename |
|---|---|
hy |
learn-hy.hy |
;; this gives an gentle introduction to hy for a quick trial head to
;; try-hy.appspot.com
;;| ;; this gives an gentle introduction to hy for a quick trial head to | |
| ;; try-hy.appspot.com | |
| ;; | |
| ; Semicolon comments, like other LISPS | |
| ;; s-expression basics | |
| ; lisp programs are made of symbolic expressions or sexps which | |
| ; resemble | |
| (some-function args) |
| #include "fibs.h" | |
| long fib(int n) | |
| { | |
| if (n == 0) | |
| return 1; | |
| else if (n == 1) | |
| return 1; | |
| else | |
| return fib(n-1) + fib(n-2); |
| (import re | |
| linecache | |
| inspect | |
| [hy.lex.lexer [lexer]] | |
| [itertools [count]]) | |
| (defmacro getstartlines [f] | |
| "Gets the starting lines for a given function" | |
| (if-python2 `(. ~f func-code co-firstlineno) |
| import ast | |
| from functools import partial, wraps | |
| DEFAULT_INDENTATION = 2 | |
| def enclose(parens,newline=False): | |
| def decorate(func): | |
| @wraps(func) | |
| def wrapper(self,*args,**kwargs): |
S3/Swift like systems have the concept of objects & buckets (or Containers). These objects are often striped into multiple RadosGW objects.
An object is split into a 'head' part and a logical 'tail' part. The head will never be more than a predefined chunk size (default is
| FROM ubuntu:14.04 | |
| ENV DEBIAN_FRONTEND noninteractive | |
| RUN apt-get update && apt-get install -y \ | |
| autoconf \ | |
| automake \ | |
| autotools-dev \ | |
| ccache \ | |
| libbz2-dev \ |
| Bringing machine 'default' up with 'kvm' provider... | |
| ==> default: Importing base box 'precise64'... | |
| ==> default: Assigning a new mac address to the VM. | |
| ==> default: Preparing network interfaces based on configuration... | |
| ==> default: Booting VM... | |
| ==> default: Waiting for machine to boot. This may take a few minutes... | |
| default: SSH address: 192.168.123.99:22 | |
| default: SSH username: vagrant | |
| default: SSH auth method: private key | |
| default: Warning: Host unreachable. Retrying... |
| (defun send-region-as-email (start end) | |
| "A hacky function to send a region as mail | |
| Assumes the region follows the below format | |
| To: <recepient> | |
| Subject: <subject> | |
| <mail body>" | |
| (interactive (if (use-region-p) | |
| (list (region-beginning) (region-end)) | |
| (list nil nil))) | |
| (let* ((selection (buffer-substring-no-properties start end)) |
active_branch: giant