Elliot John Voris

Faith. Family. Technology.

Elliot John Voris - Faith. Family. Technology.

Fibonacci Sequence in Python

In case anyone ever wanted to know how to run the Fibonacci Sequence in Python, here’s how I did it:

#!/usr/bin/env python
import sys

f_seq = [ 0, 1 ]

while len(f_seq) <= int(sys.argv[1]):
    f_seq.append(f_seq[-1] + f_seq[-2])

print f_seq

Now, all you have to do is run ‘fibonacci.py 20’, and it will give you all the numbers through F20 (starting at zero).

Update: I put this up on Github, and have made a couple changes since. Check it out here!

Here’s a really handy command that I tend to forget exists.

If you’re running out of disk space, it can be really hard to track down a runaway file. Here’s a way you can get some more information.

du -hs /path/to/directory/or/file

This helped me figure out once where my 114GB log file was taking up all my space! Super handy!

EDIT: I will point out that if you are trying to find the size of all files or directories in a given directory, use the asterisk to target them all:

du -hs /home/elliot/*

Another Year, Another Round

Each year, we pick our opponent. Each year, we pick the size, weight, strength, and reach of our heavyweight contender. Each year, we decide who we’ll match up with in our title fight.

This year, I tried to make sure my opponent was simple, easy to understand.
This year, I tried to make my opponent beneficial.
This year, I tried to limit the opponents I would actually decide to take on.

Here are my opponents for this year, in no particular order:

Write more consistently. I really like to write and put my thoughts down on paper (or on the internet). Ideally, I’d like to do this on a more regular basis.

Read my Bible daily. This is the discipline that continues to elude me. I feel like this will be the year that I finally get it down to a habit that I keep.

Read one book per month. I need to read. Not more, period. I really need to feed my brain with information. I think a book per month is a pretty good pace that I can achieve.

Exercise. Any amount is a vast improvement.

Dress like an adult now and then. Some days, I want to ditch the jeans and t-shirts that I’m so comfortable in. I want to get clothes that make me look like an adult, and then wear them once in a while. I’m a dad now, so why not dress like one?

Contribute to a community project regularly. I’m a big fan of the Open Source community. I’d like to contribute, financially or otherwise, to some community project frequently.

The key in my heavyweight bout: Roll with the punches! If I’m too dogmatic with any of these, I’m bound to fail. Flexibility will allow me to fail, get up, dust myself off, and try again.

I love Linux! There’s no two ways about it! For the past few years, I’ve become enamored with the open-source jewel that is Linux.

Lately, I’ve been going crazy with aliases. I’ve also been trying to make my life easier with some simple Bash/Python scripts.

When my friends over at Hak5 uploaded a HakTip about searching Wikipedia from the terminal, I knew I had to alias/script it up!

Here’s the script I put together:

# Store all arguments I provide as a string, SEARCH
# Replace any spaces with underscores, search wikipedia
dig +short txt ${SEARCH// /_}.wp.dg.cx

Combine that with an alias, like “alias wp=’/home/elliot/scripts/digwp.sh'”, and we get the following:

elliot@desktop ~ $ wp the tom green show
“The Tom Green Show is a North American television show which first aired in September 1994 on Rogers Television 22, a community channel in Ottawa, Ontario until 1996, and was later picked up by The Comedy Network in 1997. (In 1996, Green also produced a p” “ilot episode for CBC Television, although the CBC did not pick up the series.) http://a.vu/w:The_Tom_Green_Show”


Investment for the Future?

As I write this I’m sitting in a carX waiting room, using a free wi-fi connection (a nice 25mbps, by the way), sipping on some free coffee, and feeling a touch defeated.

Today, I took my car to the shop (which I try to do as infrequently as possible) to get new tires. This purchase was planned. This purchase was budgeted for. This purchase was expected. I was looking to be out the door for just a touch over $500. This is just in the nick of time, too. My license plate tags are up this month. I need to get this thing to pass a safety inspection and an emissions inspection. I expected to get the tires and inspections done and be on my way. Unfortunately for me, I was once again proven to be mistaken.

The kind folks at carX, with whom I’ve built a trusting relationship with prior to this visit, candidly told me that I also need new brake hoses, a power steering system overhaul, and new swaybar linkages before the car will pass the safety inspection. Goody!

That $500 purchase that was planned, budgeted for, and expected has now crept to up almost $1,300. More than doubled!! Almost tripled!!! These extra repairs are unplanned. These extra repairs are not budgeted for. These extra repairs are unexpected. Now, you can see why I’m feeling defeated. I’d done well planning for this

I’m trying to look at this through positive lenses, though. I’ve got a baby on the way. An extra $800 now, in the long-run, is well worth the peace of mind that I’ll get from knowing that my car is in decent driving condition; and knowing it won’t kill me, my wife, or my new baby girl.

I know this car. I know what’s working well on it. More importantly, I know what’s working poorly on it. If I take care of this car, it will conceivably see me through quite a while. I’d like to run this car into the ground! What that means for now, is keeping it happy and maintaining the parts as they fail. We’re at 160,000 miles, and I’d like to keep it running for another 160,000+. Lord willing, maybe one day I’ll give it to my daughter as her first car.

Daddy, What was it Like …

If you’re unfamiliar with who I am, or what’s going on in my life, you may not know that my beautiful wife, Brandy Voris, and I are expecting a daughter. Whoa!! I’m just going to let that sink in for a minute…

I’m going to be a father. God, in all His infinite wisdom, saw fit to trust my clumsy hands with the life and care of another real-life person … Why? What business do I have raising a daughter? What makes me even remotely ready to do this? I know about computers and Jesus. How does that qualify me to be a dad?

I feel like it was just yesterday that I was sitting in the dorms at SLCC, acting like a total dill-hole (ya know, like college kids do). Even still, I find myself looking back quite fondly on my “college days.” I was so free. I didn’t have any responsibilities. I didn’t have to provide for anyone. I didn’t have any bills. It was so sweet!

Yet, despite all my questions, despite all the fond memories of my former days, despite feeling unprepared; I’m more excited than I’ve ever been in my life. This is a completely new chapter for me. I’ve never experienced anything like what I’m about to go through with this child. We get to learn together! I can’t wait for Yo Gabba Gabba marathons, walks in the park with a stroller, wearing my daughter like a living front-backpack, and kindergarten musicals!

One chapter ends on our journey of life, and another begins. All we can do is look forward to the winding road, and give it everything we’ve got.

What was your reaction when you found out that you were going to be a parent?

Draggin’ Butt

Have you ever had one of those days where you just felt like your feet were dragging, no matter what you were doing? I’m not talking about just a little tired, or just feeling a bit off here. Think about being completely exhausted. Think about being totally stretched past your limits. This was my day today.

I’ve had an unbelievably productive week at work. First, I’ve made some major headway on our Evergreen project at the college. The server had been down for quite a while, now. I’ve been able to get the software up and running, and I’ve finally had a bit of luck importing some of our records into the database. Unfortunately, we’re not out of the woods quite yet. This will prove to be a big project for me for a week or so to go, but I made some giant leaps forward on this project during the past few days.

Second, I was able to go live with the new online application for the Admissions team. We’ve made a couple of improvements to the application, added a few fields, and made it generally more user-friendly. If you’re a potential college student, check it out, and apply here!

Finally, I’m working on a really nifty new service coming for the students of Saint Louis Christian College. A few weeks back, we introduced a piece of software called PaperCut. It’s an all-encompassing Print Management program that allows the students to print to our new copy machine easier than they have in the past. This new feature that I’m working on will allow them to upload directly from their laptop (in .docx, .xlsx, .pptx, .xls, .pdf, etc. format) to the new copy machine. It’ll print right from their laptop, but still charge their student accounts as if they were working on one of the library WorkStations. I’m really excited to roll this out, and I think the students will be, as well.

All of this really just piled up today. I was so dragging all day long. I felt like I was going to crash and fall asleep standing up in the Library.

Like I said, I feel like I had a greatly productive week! But I’m also ready to fall asleep tonight and wake up on  Sunday!