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
Linux vps 2.6.18-238.12.1.el5.028stab091.1 #1 SMP Wed Jun 1 13:20:25 MSD 2011 i686 | |
The programs included with the Debian GNU/Linux system are free software; | |
the exact distribution terms for each program are described in the | |
individual files in /usr/share/doc/*/copyright. | |
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent | |
permitted by applicable law. | |
No mail. | |
Last login: Sat Aug 27 02:03:27 2011 from c-98-245-46-242.hsd1.co.comcast.net |
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
Day job: | |
Student, quite boring really, and doesn't pay well... | |
Favorite Python project: | |
Inventory Management API | |
Favorite Conference: | |
Haven't sadly been able to go to one yet. | |
Python Experience Level: |
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
Welcome root, to joshashby.com | |
Current uptime: 23:12:43 up 7 days, 15:14, 5 users, load average: 0.01, 0.02, 0.00 | |
Random XKCD... | |
Perspective | |
Narrator: Sometimes, when I first wake up, I am caught in the horrible grip of perspective. | |
A person sitting up in bed | |
Person: It may be a jewel of open source, but Firefox is JUST A BROWSER. It shows WEBPAGES. What the hell is WRONG with us? | |
Narrator: Fortunately, this subsides quickly. | |
I wonder what I was dreaming to prompt that. I hope it wasn't the Richard Stallman Cirque de Soleil thing again. | |
http://xkcd.com/198/ |
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
#!/bin/sh | |
#Quick hack to try out making users and doing a few things with their accounts for my VPS | |
#2011 JoshAshby | |
#http://joshashby.com | |
#released (possibly) under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License | |
#[email protected] | |
#Enjoy! | |
interact() | |
{ |
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
vps:~# cat /etc/maradns/mararc | |
csv2 = {} | |
csv2["joshashby.com."] = "db.joshashby.com" | |
cvs2["kariashby.com."] = "db.kariashby.com" | |
bind_address = "64.31.21.80" | |
chroot_dir = "/etc/maradns" | |
min_ttl = 60 | |
min_ttl_cname = 300 | |
vps:~# cat /etc/maradns/db.joshashby.com |
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
vps:~# dig @64.31.21.80 joshashby.com | |
; <<>> DiG 9.6-ESV-R3 <<>> @64.31.21.80 joshashby.com | |
; (1 server found) | |
;; global options: +cmd | |
;; Got answer: | |
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 31513 | |
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1 | |
;; QUESTION SECTION: |
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
[joshua@Loki ~]$ dig @64.31.21.80 kariashby.com | |
; <<>> DiG 9.8.0-P4 <<>> @64.31.21.80 kariashby.com | |
; (1 server found) | |
;; global options: +cmd | |
;; Got answer: | |
;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 48092 | |
;; flags: qr rd; QUERY: 0, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0 | |
;; WARNING: recursion requested but not available |
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
$cat /etc/maradns/db.kariashby.com | |
kariashby.com. SOA kariashby.com. [email protected]. 1 7200 3600 604800 1800 | |
kariashby.com. NS ns1.kariashby.com. | |
ns1.kariashby.com. A 64.31.21.80 | |
kariashby.com. NS ns2.kariashby.com. | |
ns2.kariashby.com. A 64.31.21.80 | |
kariashby.com. A 64.31.21.80 |
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
The Python bit: | |
m = len(query) | |
for i in range(m-1): | |
if (query[i]['quantity'] < query[i+1]['quantity']): | |
quantity.append(int(query[i]['quantity'])) | |
date.append(time.mktime(query[i]['date'].timetuple()).as_integer_ratio()[0]) | |
else: | |
break |
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
library(ggplot2) | |
mydata = read.csv("/home/joshua/Downloads/test_data.csv", header = TRUE) | |
m = length(mydata$x) | |
theta = matrix(c(0,0), nrow=1) | |
ux = matrix(c(rep(1,m), mydata$x), ncol=2) | |
uy= matrix(mydata$y, ncol=1) | |
delta = function(x,y,th) { | |
delta = (t(x) %*% ((x %*% t(th)) - y)) | |
return(t(delta)) |