Autoriser les applications moins sécurisées
Dans Google, paramètres du compte, sécurité
use cl-smpt library
(ql:quickload :cl-smtp)
<script type="text/javascript" async | |
src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> | |
</script> |
(define-condition my-error (condition) | |
((message :initarg :message :reader message))) | |
(handler-case (signal 'my-error :message "Damned! an error!") | |
(my-error (e) (warn "~s" (message e)))) |
Autoriser les applications moins sécurisées
Dans Google, paramètres du compte, sécurité
use cl-smpt library
(ql:quickload :cl-smtp)
How to write a message in another terminal (with Common Lisp) ?
(following the Reddit thread https://www.reddit.com/r/emacs/comments/hap72j/isnt_it_possible_to_ask_emacs_for_a_carriage/fv60gwq)
Install packages
apt install build-essential
apt install libfixposix3 libfixposix-dev
apt install netcat
;; use rolling-map and average (https://gist.github.com/carboleum/c329d255746a7659cb01ba0305c1d2f0) | |
(defun rsi (n prices) | |
(let ((gain (let ((cumul 0)) | |
(mapcar #'(lambda (x) (setq cumul (/ (+ (* cumul (1- n)) x) n))) | |
(cdr (rolling-map 2 #'(lambda (&rest list) | |
(if (apply #'< list) (abs (apply #'- list)) 0)) | |
prices))))) | |
(loss (let ((cumul 0)) | |
(mapcar #'(lambda (x) (setq cumul (/ (+ (* cumul (1- n)) x) n))) |
(defun rolling-map (n func list &optional (sequence '()) (return '())) | |
(cond ((eq list '()) return) | |
(t (setq sequence (append sequence (list (car list)))) | |
(if (> (length sequence) n) (setq sequence (cdr sequence))) | |
(setq return (append return (list (apply func sequence)))) | |
(rolling-map n func (cdr list) sequence return)))) | |
(defun average (&rest list) (/ (apply '+ list) (length list))) | |
(rolling-map 3 'list '(1 1 2 3 5 8 13 21 34)) |
(ql:quickload :cl-kraken) | |
(setq cl-kraken/src/globals::*api-key* "my api key") | |
(setq cl-kraken/src/globals::*api-secret* "my api secret") | |
; public market data | |
(cl-kraken::request "Time") | |
(cl-kraken::request "Ticker" :params '(("pair" . "XXBTZEUR"))) | |
; private user data | |
(cl-kraken::request "Balance" :post t) | |
(cl-kraken::request "TradeBalance" :params '(("asset" . "ZEUR")) :post t) |