Here ist my attempt to create ISO 8601 timestamps with Python.
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
;;; ticket berechnung | |
(defparameter *start-base* 9001000000) | |
(defparameter *ticket-count* 500000) | |
(defparameter *paeckchen* 5) | |
(defparameter *spalten* 9) | |
(defparameter *zeilen* 20) ;;; oder 20 | |
(defparameter *blaetter* (1+ (floor (/ *ticket-count* (* *spalten* *zeilen*))))) ;; passt nicht bei teilen ohne rest | |
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
;;; Dritte Mail: http://sourceforge.net/p/sbcl/mailman/message/23021940/ | |
;;; :element-type :default (http://www.sbcl.org/manual/index.html#Bivalent-Streams) | |
;;; *compress-streams*: http://stackoverflow.com/questions/3970001/cl-pdf-output-error | |
(setf pdf:*compress-streams* nil) |
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
;;; Monitor Folder for changes on files with inotifywait (install with aptitude or apt-get on debian or raspbian) | |
;;; For inforamation about inotifywait: man inotifywait | |
;;; Requirements | |
;;; inotifywait (aptitude or apt-get install inotifywait) | |
;;; sbcl, ccl, ... | |
;;; quicklisp | |
;;; Example-run: | |
;;; REPL: (start-monitoring) |
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
(ql:quickload "bordeaux-threads") | |
(defparameter *count* 0) | |
(defparameter *count-unlock* 0) | |
(defparameter *lock* (bt:make-lock)) | |
(defun thread-test() | |
(let ((t1 (bt:make-thread #'(lambda () (loop repeat 100000 do |
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
(ql:quickload :bordeaux-threads) | |
(setf *print-circle* t) | |
(defparameter *list* nil) | |
(defparameter *read* nil) | |
(defparameter *write* nil) | |
(defun init () | |
(setf *list* (loop repeat 100 collect nil)) ;; create list | |
(setf *read* *list*) ;; read pointer on list |
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
(ql:quickload :split-sequence) | |
(ql:quickload :cl-ppcre) | |
; PROBLEM: | |
; I have to convert the OBX-5 field of HL7-Messages (MDM T07 document edit notification) | |
; that the empty components are replaced with "" so that the receiving system recoginzes | |
; that there is a change and updates its database. | |
; EXAMPLE: | |
; OBX|1||||bla^fasl^^^^||| should be OBX|1||||bla^fasl^""^""^""^""||| |
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
;; Ensure that a Redis installation is availabel on localhost | |
;; I set the follewing parameter to prevent redis from writing to disk (/etc/redis/redis.conf): | |
;; save "" | |
(defun init () | |
"Load cl-redis and initialize the connection" | |
(ql:quickload :cl-redis) | |
(redis:disconnect) | |
(redis:connect) | |
(red:ping)) |
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
;;; Redis: writing to redis on raspberrypi (sensors-owb01) over wireless lan with and without pipelining | |
(defparameter *test* nil) | |
(defun redis-test () | |
(print "-------------- MIT PIPELINING ------------------") | |
;; aufraemen | |
(setf *test* nil) |
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
;; Library: https://github.com/MartinEnders/word-search | |
(defun erlangen-words () | |
(let ((max-count (length "erlangen"))) | |
(loop | |
for x in (apply #'append | |
(loop for i from 1 upto max-count | |
collect (word-search:find-word i "erlangen"))) | |
counting x into count | |
do (format t "~A. ~A~%" count x)))) |
OlderNewer