Gist for a simple line chart for public health data from Puerto Rico.
Humberto Ortiz-Zuazaga humberto.ortiz@upr.edu
Part of SalHUD.
2014/03/31 - HOZ
Added x axis line, fixed labels.
Gist for a simple line chart for public health data from Puerto Rico.
Humberto Ortiz-Zuazaga humberto.ortiz@upr.edu
Part of SalHUD.
2014/03/31 - HOZ
Added x axis line, fixed labels.
;;;; All you need to know about lisp in one screen | |
;;;; Humberto Ortiz-Zuazaga <humberto.ortiz@upr.edu> | |
;;; The identity function takes one argument and returns it | |
(defun id (x) x) | |
;;; You can apply it to anything | |
(id 23.45) ; numbers | |
(id 'foo) ; symbols | |
(id "bar") ; strings |
;;;; chatbot.lisp - hook a random sentence generator to a jabber client | |
;;;; Copyright 2014 - Humberto Ortiz-Zuazaga - humberto.ortiz@upr.edu | |
;; This program is free software: you can redistribute it and/or modify | |
;; it under the terms of the GNU General Public License as published by | |
;; the Free Software Foundation, either version 3 of the License, or | |
;; (at your option) any later version. | |
;; This program is distributed in the hope that it will be useful, | |
;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
.text | |
.globl main | |
main: | |
subu $sp,$sp,32 # Stack frame is 32 bytes long | |
sw $ra,20($sp) # Save return address | |
sw $fp,16($sp) # Save old frame pointer | |
addiu $fp,$sp,28 # Set up frame pointer | |
li $a0,10 # Put argument (10) in $a0 | |
jal fact # Call factorial function |
# simple sum - add a and b, store in c, print c, then return | |
# Copyright 2011, 2013 - Humberto Ortiz-Zuazaga <humberto.ortiz@upr.edu> | |
# Released under the GNU General Public Licence v3 or later | |
# See http://www.gnu.org/licenses/gpl.html | |
.data | |
vara: .word 0 | |
varb: .word 0 | |
varc: .word 0 | |
.text |
# bases.py - Copyright 2010, Humberto Ortiz-Zuazaga humberto.ortiz@upr.edu | |
# Functions to read and write numbers represented in various bases | |
digits = "0123456789ABCDEF" # digits for bases 2 - 16 | |
def readnum(numstring, base): | |
"Read a string of digits in base BASE, and compute the correct decimal value" | |
value = 0 | |
for i in range(len(numstring)): | |
value = value * base |
# Compute 10 elements of fibonacci sequence | |
# Copyright 2011, 2013 - Humberto Ortiz-Zuazaga <humberto.ortiz@upr.edu> | |
# Released under the GNU General Public Licence v3 or later | |
# See http://www.gnu.org/licenses/gpl.html | |
# Uses the 16-bit assembly we made up for our less broken cpu. | |
# http://www.hpcf.upr.edu/~humberto/courses/arch2013/less-broken-cpu.html | |
add $1, $0, $0 # $1 is base | |
add $2, $0, $0 |
v2.0 raw | |
100 200 8209 0300 83fe 0400 8401 3410 8101 3410 | |
8101 2413 8301 2513 0645 3610 83ff 710 87f7 b7f7 |