PV Derby 2014

June 2nd, 2014 No comments

I raced the PV Derby at Peaceful Valley scout ranch. It is a fun course with a little of everything put mostly two-track. Kelly Niquette started hard up the hill and I wasn’t feeling very comfortable. I was surprised and kinda bummed to see a line or more like a group of rider right there with us at the top of the climb. The course then turns into a short single track section that descends and then gradually climbs to a short steep pitch then back onto a long dirt road section. Kelly lead into the single-track followed by Jeff Hall and myself. When we came out onto the road it was the tree of us with I think Todd Johnson and maybe Curt Wilhelm bridging the gap up to us. To this point Kelly had gone hard since the start and just before we entered the next singletrack section Kelly made a minor course error which resulted in Jeff leading into the singletrack. I was instantly wishing I was leading as it seemed Jeff was going slow. I was a little too jazzed and got stopped up twice from following Jeff to close. This resulted in me getting shuffled to the back of our little group. After this singletrack section are the only 2 real climbs on the course. We all stayed together with Kelly again pressing the pace. At this point we are about 7 miles into the race and we could see the lead group of about six 30-39 ahead of us. They were going way slower than we were. We came up on them just as we were going into some singletrack. I had told myself I was going to lead into the next singletrack so I made an effort to do so and did. It turned out better than I had expected. I made my way around the group of riders and Kelly, Jeff and Todd (others?) all got hung up in the group. It was only a few miles later and I had about a 30sec gap on Kelly who also had about a 30sec gap on the others which now seemed to be a group of 5 or six and probably a mix is my group and the 30-39 races. I was trying to ride a comfortable pace now that I had a gap. It looked like Kelly was closing the gap and I thought that was probably a good thing. It was my turn to make a course error. The problem was I could not see anyone ahead of us and there did not seem to be enough tracks on the ground. I couldn’t see anyone behind or ahead of me so I stopped. Looked back until Kelly came along and reassured me that we were on course. This was about 11 miles into the race. I lead with Kelly sitting on to the end of the first lap at which point Kelly started to lead. We had a good gap at the end of the first lap about 1.5 min. It had started to get hot and getting a new bottle was nice. Kelly and I rode together for a while but when we got to the climbs I Kelly was going really hard again. We had gotten mixed up with some single speeders who were hammering up the climbs and single speeders are apt to do (unless they are walking) I think Kelly saw an opportunity to get away with from me with another rider. I thought he was going to hard and let him ride away. Kelly put about 2 min on me that lap (1:40 laps) I was not sure I was going to see him again. About halfway through the last lap I started to see Kelly up ahead of me again. At times I thought I was gaining on him quickly and then it seemed I wouldn’t see him for abit. With about 4 miles to go I could see him about 1min ahead and he was clearly going slow. I close the 1min gap in about 2 miles. I got him in the one place on the course you had to walk over a rock. He said he was done but didn’t seem very interested in letting me by. I got by and put about 1min on him in the last 2 miles. I finished in just under 5 hrs (4:49) which was about 8min faster than I did last year. From what I hear, behind Kelly and I Jeff, Todd, and others where struggling with the early pace. Jeff is always strong and Todd was flying at Bear Creek so I was surprised they were not back with us at the end of the first lap. I head Todd seized up and didn’t finish, Jeff kept fighting but ended up 13 min back.

I have been thinking about riding pro. The 40-49 age group is really fast and we consistently beat the other younger age groups and at this race Jeff, Kelly and myself would have all been in the top 5 in the pro based on time. That said 1st place was 25 min ahead of me.

PV Derby 2014

2014 PV Derby finish

Categories: Racing Tags:

How they work, Cryptocurrencies Like Bitcoin

May 8th, 2014 No comments

This is a well written explanation of Cryptocurrencies like Bitcoin based on Minimum Viable Block Chain.

http://www.igvita.com/

Categories: Uncategorized Tags:

de Bruijn sequence: Part 1

May 7th, 2014 No comments

I was thinking about genetic sequences and the problem of assembly. I have followed Titus Brown‘s use of Bloom Filters. To learn more about Bloom Filters and their application to genetic sequence assembly check out Handling ridiculous amounts of data with probabilistic data structures by Titus Brown. Part of the problem is both the amount of data and the number of combinations or sequence samples. I am interested in the most compact for to store all possible combination of sequences of a given length. The solution is a de Bruijn sequence

Below are a few different functions I experimented with to produce a de Bruijn sequence.

In [2]:
import memory_profiler
import timeit
import string

def de_bruijn_1(k, n):
    """
    De Bruijn sequence for alphabet size k (0,1,2...k-1)
    and subsequences of length n.
    From wikipedia Sep 22 2013:
        Modified last line to return a string rather than a list
    """
    a = [0] * k * n
    sequence = []
    def db(t, p,):
        if t > n:
            if n % p == 0:
                for j in range(1, p + 1):
                    sequence.append(a[j])
        else:
            a[t] = a[t - p]
            db(t + 1, p)
            for j in range(int(a[t - p]) + 1, k):
                a[t] = j
                db(t + 1, t)
    db(1, 1)
    #return sequence  #original
    return ''.join([str(i) for i in sequence])

################
def de_bruijn_strings(k, n):
    """
    De Bruijn sequence for alphabet size k (0,1,2...k-1)
    and subsequences of length n.
    Modifed wikipedia Sep 22 2013 to use strips
    """
    global sequence
    global a
    a = '0' * k * n
    sequence = ''
    def db(t, p):
        global sequence
        global a
        if t > n:
            if n % p == 0:
                for j in range(1, p + 1):
                    sequence = sequence + a[j]
        else:
            a = a[:t] + a[t - p]  + a[t+1:]
            db(t + 1, p)
            for j in range(int(a[t - p]) + 1, k):
                a = a[:t] + str(j)  + a[t+1:]
                db(t + 1, t)
        return sequence
    db(1, 1)
    return sequence

################
_mapping = bytearray(b"?")*256
_mapping[:10] = b"0123456789"

def de_bruijn_bytes(k, n):
    """
    By Peter Otten on python-list
    """
    a = k * n * bytearray([0])
    sequence = bytearray()
    extend = sequence.extend
    def db(t, p):
        if t > n:
            if n % p == 0:
                extend(a[1: p+1])
        else:
            a[t] = a[t - p]
            db(t + 1, p)
            for j in range(a[t - p] + 1, k):
                a[t] = j
                db(t + 1, t)
    db(1, 1)
    return sequence.translate(_mapping).decode("ascii")

d1 = de_bruijn_1(4, 9)
d2 = de_bruijn_strings(4, 9)
d3 = de_bruijn_bytes(4, 9)

print('They are the same?', d1==d2==d3)

# from de_bruijn import *
%memit de_bruijn_1(4, 10)
%memit de_bruijn_strings(4, 10)
%memit de_bruijn_bytes(4, 10)
('They are the same?', True)
peak memory: 43.86 MiB, increment: 17.18 MiB
peak memory: 28.51 MiB, increment: 0.53 MiB
peak memory: 33.89 MiB, increment: 5.03 MiB

As you can see above the memory requirments for the de_bruijn_strings and de_bruijn_bytes and significantly less. This is really the limiting factor in increasing the word size. On the machine I am testing on I think I can go up to de_bruijn_bytes(4, 17) before I fill the memory.

In [3]:
!python -m timeit -s 'from de_bruijn import de_bruijn_1' 'de_bruijn_1(4, 10)'
!python -m timeit -s 'from de_bruijn import de_bruijn_strings' 'de_bruijn_strings(4, 10)'
!python -m timeit -s 'from de_bruijn import de_bruijn_bytes' 'de_bruijn_bytes(4, 10)'
10 loops, best of 3: 585 msec per loop
10 loops, best of 3: 59.5 sec per loop
10 loops, best of 3: 168 msec per loop

Notice That although the de_bruijn_strings uses low memory it is really slow. de_bruijn_bytes is my far a better solution.

 

Categories: Uncategorized Tags:

Really?

April 6th, 2013 No comments

This:
“The official said Defense Secretary Chuck Hagel decided to put off the long-planned Minuteman 3 test until sometime next month because of concerns the launch could be misinterpreted and exacerbate the Korean crisis”

Does not seem consistent with:
“ongoing U.S.-South Korean military exercises, which have included a broad show of force ranging from stealthy B-2 bombers and F-22 fighters to a wide array of ballistic missile defense-capable warships.”

I don’t think the U.S. has any concern of how North Korea interprets the missile test. I wonder what the real reason is.

Categories: Uncategorized Tags:

Korean concert – Gangnam style

October 19th, 2012 No comments

I have been to 1 concert in my life. It was at a concert venue jest west of Kansas City. I don’t remember when it was, maybe between my sophomore and junior years of high school. I also don’t remember the who the bad was. Obviously it did not leave much of an impression and as time has past my interest in listening to music much less going to a concert has decreased to near zero.

Gangnam style, I find this interesting for many reason. The music seems to barrow and mix a lot from other songs. The video is funny. Planet Money had a podcast episode on  talking about the Korean music industry and this song. Reading about the  Gangnam district is interesting.

So I was watching the music video for Gangnam Style and the went to the official YouTube channel to listen to other music by PSY and came across the live concert recording video of Gangnam Style in Seoul Korea (below). I would like to see that. Not really for the music or performance but more that it looks so completely different from what I think of as a concert.

 

Categories: Life Tags:

Big lego’s

July 10th, 2012 1 comment

Pascal and I have been building legos together. This is impressive.

Categories: Life Tags: ,

Connecting WordPress and Facebook

October 3rd, 2010 No comments

There seem to be no good and simple solutions to this. WordBook works well but only posts from your blog to Facebook. Other apps that promise more or better integration seem to be a real hassle to get working. I am sure it is one of those things that once you do it it is easy. I am just not sure I care to spend my time figuring it out.

Categories: Uncategorized Tags:

Helmet Camera

October 2nd, 2010 No comments

I have been playing with a new helmet camera. At it’s best it will record 1080p at 30fps there are many other recording options. Below are a few videos, I haven’t edited them much or at all except for clipping them. One problem with HD is editing is really slow.   I tried to do an image stabilization on a 2 hour video and let it run for 2 days and still had more that 96hour left. It was not on a slow computer. I wonder if it has something to do with how much movement there is in the video. Obviously a helmet cam has lots of movement.

Frisco Cyclocross, (not all the race)

Boulder Xiilinx Cyclocross

Boulder Cyclocross Xilinx 2010 from Vincent Davis on Vimeo.

Categories: Uncategorized Tags:

Leadville 100

August 15th, 2010 No comments

Lisa got an email about a month ago from the Leadville 100 organizers (medical) seeking doctors who where interested in volunteering at the medical aid stations. Lisa ask if I was interested in riding the Leadville 100. It’s been on my to do some day list, I guess it will be 2011. Lisa had to be at the start for a 6:15am meeting but the finish line medical (where she is) opens at 1:00pm.

We had a good time in Leadville this morning. There is a 12mile bike bath around the town and we have been wanting to ride it since it was built. But it is hard for me to justify an hour dive to ride 12 miles. Today was the day. I pulled Pascal in the trailer and Lisa road here new bike. It is a really great ride, I wish it was 100 miles. It is really amazing how much mining has been done in Leadville. There are mines and equipment everywhere. If you have ot read any of the history it is really amazing. I think around 1900 there where more Millionaires in Leadville than any other city in the USA.  We (Pascal and I) hung out until Levi, Jeramey and Todd finished and then left. Levi set a new course record of ~6:16 with is about 16mph. I think you get the buckle it you can finish in under 9hr, 11mph that seems very doable. I think you are considered a finisher if you finish in under 12hr  8.3mph. The Leadville 100 running race in next weekend they start at 4:00am and you must finish before 10:am the next morning. They are really wanting Lisa to help out for that. I guess after about midnight medical gets really busy. Looks like the running course record in 15 hours and 42 (about 9.3 min miles)

http://www.leadvilletrail100.com/lt100races/LeadvilleTrail100MountainBikeRace/overview.aspx

http://en.wikipedia.org/wiki/Leadville_Trail_100

Categories: Life Tags:

Measuring the impact of social media as a marketing tool

November 10th, 2009 No comments

I was watching this video http://www.youtube.com/watch?v=6ILQrUrEWe8 and dell clams it has made over $3 million from twitter posts. There appear to be 6 million active users, $2 per user. I find that hard to believe. I know that might be lots more hearing about the tweets but. Make me wonder what they are tweeting? Maybe it’s $2 coupons.

Categories: Uncategorized Tags: ,