Thursday, May 28, 2009

Trac Wiki Add Attachment Programatically

Yesterday, I was surprised to find out that there is no utility in trac-admin for adding/deleting attachments from a wiki page. I wanted a simple test script to accomplish this. I took a look at the moin2trac.py script and ended up ripping out a small part of it in order to put together a minimal test script. This was tested using trac-0.11.4 with Python 2.5.
import os
from trac.attachment import Attachment
from trac.admin.console import TracAdmin

wikidir = r'C:\Path\To\My\TracProject'

admin = TracAdmin()
admin.env_set(wikidir)

filename = r'c:\Path\To\My\Images\2_0.jpg'

attachment = Attachment(admin.env_open(), 'wiki', 'tutorials/page1')

size = os.stat(filename)[6]
attfile = open(filename,'rb')

attachment.insert(os.path.basename(filename), attfile, size)

The parameters should be reasonably self-explanatory, although do not hesitate to send any questions. I'm thinking it would be reasonably simple to add this functionality to trac-admin. I will probably take a look at this sometime soon and submit a patch.

Cheers!

Sunday, May 17, 2009

Emma - Future Hacker

My wife and I waited in the car today while my buddy Adam went into Borders for a few. He ended up coming out with a rather interesting baby gift, namely a copy of this seasons 2600 Hacker Quarterly. To our surprise, it has a picture of a baby operator named Emma, complete with a headset! Quite a coincidence seeing that our little Emma is on her way.


Is this a sign of things to come? Perhaps a future hacker? Either this is one really neat coincidence, or someone in cahoots with Emmanuel Goldstein.

insert spooky music here...

Monday, May 4, 2009

Bone Discovery - Case Closed (sort of)

Previously, I had concluded that the bones belonged to a canine. If there is one thing that I have learned throughout my life, it's that Experience Counts. So I set out to ask some individuals with industry experience. I ended up sending out a couple of emails to anthropology professors at the University of Central Florida in search of a second opinion.

John Schultz, a Ph.D. from the Department of Anthropology was the first to respond. He first indicated that I would not need to search for a microchip out in the woods. He then indicated that the partial skeleton had belonged to a juvenile deer, that was most likely hit by a car.

Without prior knowledge and looking solely at the spine and pelvis, it does seem as if the bones could belong to a canine. However, after looking at a deer skeleton and seeing the size of the femurs, things become much clearer. My casual attempt at classifying the bones turned out to be incorrect. I was dissapointed in myself for not conducting a more detailed analysis. On the other hand I was reasonably relieved by this, since I would not have to search for that microchip in the brush!

Some people like to see a glass as half empty or half full. I am one of those people that are just happy the glass exists. I'm happy this little deer and I came to cross paths as we did. Life has an interesting way of making things happen sometimes. This little deer had no clue that someone named Joe would eventually be sifting through the brush for it's bones. But someone named Joe did and learned quite a bit from it!

Sunday, May 3, 2009

Bone Discovery - More Findings, More Photos

I walked my dog this afternoon and took another visit to the site. Unfortunately, my camera batteries were dead and I didn't realize this until trying to use it, so I was unable to take photos at the site. I searched around high and low for more specimens. I found several small pieces of bone and cartilage around the hole. I searched around within a 5 meter radius of the site and was unable to find any more large pieces. On my walk back however, I moved very slowly and was able to find one more vertebrae. The image below is a summary of my finds for today.


Since dinner was finishing up when I brought them in, I figured it would be better to just wait until after dinner. I cleaned them off with hot water and now they are busy drying. In the mean time, here's a few shots of some of the other bones discovered yesterday.


This is the pelvis. While I was cleaning it, the bone cracked straight through the center. I was really upset about this. In the photo above, the two pieces were leaned up against each other to make it look uniform while taking the picture.


The picture above shows all the detached ribs that I found. These are not displayed in any particular order but were rather aligned so as to minimize the number of photos I needed to take of them.


Here is a picture of four teeth. All-together, I could identify five teeth but the picture above is missing one of them.


These are a series of small joints that I did not align to any particular bone. It should be fairly easy to do so but i'm pretty tired right now. You can see how these fit together in the image below.


This is a collection of various bones, joints, smaller teeth? and pieces of cartilage.


This is the scapula, that is located near the top of the front legs on canines.


I am going to be reasonably busy this week and i'm not certain when I will be able to make another pass at the area to look around. So, in the mean time, you can sift through my previous bone-related posts.

Cheers!

Saturday, May 2, 2009

Bone Discovery - Putting some pieces together

If this is a canine, I believe these would be called the Lumbar Vertebrae. Below, you can see a close up shot of one of the vertebrae.

I have uploaded the highest quality images, so you should be able to click on the image and zoom in effectively. After about 10 minutes of trial and error, I was able to assemble all the vertebrae into a complete column combined with the tail bone.


It's appearing to come together rather nicely. I attempted to continue by assembling the thoractic vertebrae, however it has turned out to be a reasonably difficult task. You can see the individual specimens lined up on the desk above the yellow paper. The pieces that have a half rib attached are also difficult to piece together. I was able to find one that lines up nicely with the existing column and placed it into position. Fortunately, this piece has one of the ribs attached and provides a better picture of the animal.


As these pieces are reasonably difficult to pieces together, I decided it was time to do a little research. I needed a frame of reference, so I looked up a skeletal diagram for felines, racoons and a canine. The closes match I found was a canine, so I was right!! The reference skeleton I used can be foung here:

http://www.jorvet.com/catalog/images/products/289_309_Pictures/J774.gif

The skeletal structure I have been examining has a pelvis that strongly resembles the one above. In addition, the spinal column lines up quite similarly. The femurs also appear to be anatomically correct. I would venture to say that there is sufficient evidence that this animal was in fact a canine. While lining up the femurs with the pelvis, I made an interesting observation. The right femur is what I looked at first and it lined up great. The left femur however appears to have undergone a compound fracture. The image below show the Right femur on the top and the Left femur on the bottom.

The image below provides a close up of the compound fracture.


In addition, two hairline fractures can be noted on the right femur. Each of these fractures are on opposing sides of the bone. Below are two images of each of the hairline fractures.


The area this specimen was discovered is roughly 3 meters distance from a side street that cars typically fly down. I am going to venture to say this canine was hit by a car and managed to work its way towards the brush. While in pain, it decided to sit down in the shade underneath the trees where I found it. I did not think about this at first but in the place that I discovered the bones, there was a hole dug out. It was roughly a foot or so deep and all the bones were found centered around it. Most bones were found right in the vicinity of this hole and around the outside of it. I'm wondering if the dog was in severe pain and dug out the hole? When dogs dig, they have quite a bit of weight on their hind legs and move their front legs rapidly in the regular digging motion. This would require putting a bit of weight on the heind legs. This theory doesn't seem to add up, since at least one leg was severely damaged. So now i'm really confused about where the hole came from and why?? I'll provide some photos tomorrow of the surrounding area. Perhaps you can help me solve this mystery.

Bone Discovery - To be or not to be a Scientist

I graduated from the University of Central Florida with a BS in Computer Science and a minor in mathematics. By definition, that makes me a scientist and naturally scientists are curious about things. Anyone who knows me is aware of how curious I am about all sorts of things. Today, curiosity got the best of me and hence this blog post. I walk my dog most every evening while participating in the LMARS net (on 174.285 for those interested). I take different paths each night while walking but most nights I pass a wooded area. Recently, I noticed a set of bones that were roughly 2 meters in from the sidewalk and reasonably exposed to the elements. There was a hole dug out in between where they were resting, which did not make much sense to me. I will head out to the area of interest tomorrow to take some photos so that everyone can see what i'm talking about. Not too long ago, this animal was an eating, breathing, living being that was busy doing its business. What type of animal is it? How did it die? Why did the animal die at this location? I started asking myself all sorts of questions and decided to start searching for some answers. After examining the bones for a few more minutes, I decided I should pack up my pooch, head back to my apartment, grab a box, some gloves and start collecting the specimen. That's exactly what I did. I excavated all sorts of small bones and fragments from the site. One of the leg bones was roughly 3 meters away from the rest of the bones and I found several ribs roughly 2+ meters away. I am expecting other animals (vultures) probably got to chewing on some of the remains and carried these bones a distance from the main site. I had to sift through all sorts of foliage, dirt, branches, etc to pull them out but i'm reasonably satisfied with my findings. All in all, I spent roughly 30 minutes collecting. Unfortunately, I was unable to find the skull !! I am going to make a second attempt at the area tomorrow to see if it was dragged away.

I placed all the bones into a cardboard box and carried them home. I then proceeded to wash them by hand in warm water, wearing gloves. I was careful to keep all bones that were still attached with flesh together. Some of the pieces detached during cleaning, including the hip bone. After being washed, I put all the bones on a piece of plastic on top of napkins to dry out. You can see the results below.


As stated above, i'm a computer scientist, not an anthropologist. My mom did teach anthropology in college and I learned a bit about it when I was a kid. Outside of that, i've never taken a course and have no 'professional experience' in such things, so if you or someone you know can shed some light on this topic, please let me know. I was able to identify what appeared to be the following bones immediately.
  • several ribs
  • several vertebrae
  • several throacic vertebrae
  • a scapula
  • front leg bones
  • heind leg bones
  • tail bone
  • pelvis
  • several teeth
If I were to make an 'un-educated' guess at this time, I would wager on canine. But that's enough guessing games for me, it's time to get back to the table and start fitting the pieces together!