Least I could do
I just spent the last two hours with my eyes glued to the computer monitor reading through a years worth of LICD archives. It's an entertaining strip.
I get cable internet and TV today. w00t, I finally have another way to waste time at home.
-To class now
Friday, September 23, 2005
Wednesday, September 21, 2005
the struggle
Disgruntled Professors
I don't know if this is common only to French people or if it's a magical force that insists at least one of your professors must be a complete jackass. I'm registered for Algorithm Analysis in the computer science degree here at UBC. Well, I was under the impression that I might not have met the prerequisite to the class so I requested a waiver. The professor gave me the "I doubt I'll let you in. To satisfy you, I'll ask my colleagues" speech. He emails me his reply, "No, because of two things. 1) You'll be an extra paper to grade and 2) I'll have to slow the class down and explain everything to you twice". So I politely replied through email asking him to reconsider. His answer, "No".
Well, I checked the calendar and I didn't need a minimum grade in any of the three requisite classes. Just to have passed all three. So I apologized to him in his office. "Let me check. Hrm, you're right. You are in my class. Unfortunately there is nothing I can do about it." Then he went on about some issue with plaguerizing my homework. I straightened that out by showing him where I quoted my source. He's out to get me.
-French or disgruntled. Same thing, right?
I don't know if this is common only to French people or if it's a magical force that insists at least one of your professors must be a complete jackass. I'm registered for Algorithm Analysis in the computer science degree here at UBC. Well, I was under the impression that I might not have met the prerequisite to the class so I requested a waiver. The professor gave me the "I doubt I'll let you in. To satisfy you, I'll ask my colleagues" speech. He emails me his reply, "No, because of two things. 1) You'll be an extra paper to grade and 2) I'll have to slow the class down and explain everything to you twice". So I politely replied through email asking him to reconsider. His answer, "No".
Well, I checked the calendar and I didn't need a minimum grade in any of the three requisite classes. Just to have passed all three. So I apologized to him in his office. "Let me check. Hrm, you're right. You are in my class. Unfortunately there is nothing I can do about it." Then he went on about some issue with plaguerizing my homework. I straightened that out by showing him where I quoted my source. He's out to get me.
-French or disgruntled. Same thing, right?
Saturday, September 10, 2005
blecketybleck
Nothing Really
Done the school thing for a few days, went to some classes.
Algorithm Analysis
Could be an alright class. I figure anything that teaches you how to do something better is worth while. Though my first lecture left me feeling like I know nothing about computer science at all. If I apply myself (I spent the last 3 hours refreshing myself with sorting algorithms) then I can pull a good grade.
Introduction to Philosophy Term 1
I've always enjoyed philosophy and am glad to be taking another. This is my first philosophy class since my first year of university (three years ago, Logic and Critical Thinking) and think I can really perform well in it. Our first lecture was a 'field trip' to the gymnasium where the Presidents from the universities of Ritsumeikan (Japan), Mexico, Korea, Singapore, and British Columbia were assembled to discuss the term 'Global Citizen' and how each of their universities was doing their part to contribute to the world. Our goal was to decide if the colloquium could come up with a solid definition of 'global citizen' or if it was just a bunch of crap. (Crap).
Modelling and Simulation
Holy crap, this class seems to be made for me. That doesn't mean I'd have the best grade in the class but it does mean it'd do a better job than most of holding my attention. Since I've been working on my own simulation (ie Codling Moths) for the last year and a while I thought it was in my best interest to find out really what I've been doing wrong this whole time. The professor frowns on real-life situations encountered in every day life such as standing in line at a bank (queuing theory). Instead, he rather prefers to simulate things that can be turned into games (game theory). I think I like that last part. Sadly, I'm on a wait-list. Second on a waitlist, 6 others in line behind me. 20 people in the class. 18 of the registered students showed up to class, I took up seat 19. I hope I can get in.
Been reading TUX eZine. Nice read for casual Linux users.
-Wireless 'net working with my Linux partition. w00t
Done the school thing for a few days, went to some classes.
Algorithm Analysis
Could be an alright class. I figure anything that teaches you how to do something better is worth while. Though my first lecture left me feeling like I know nothing about computer science at all. If I apply myself (I spent the last 3 hours refreshing myself with sorting algorithms) then I can pull a good grade.
Introduction to Philosophy Term 1
I've always enjoyed philosophy and am glad to be taking another. This is my first philosophy class since my first year of university (three years ago, Logic and Critical Thinking) and think I can really perform well in it. Our first lecture was a 'field trip' to the gymnasium where the Presidents from the universities of Ritsumeikan (Japan), Mexico, Korea, Singapore, and British Columbia were assembled to discuss the term 'Global Citizen' and how each of their universities was doing their part to contribute to the world. Our goal was to decide if the colloquium could come up with a solid definition of 'global citizen' or if it was just a bunch of crap. (Crap).
Modelling and Simulation
Holy crap, this class seems to be made for me. That doesn't mean I'd have the best grade in the class but it does mean it'd do a better job than most of holding my attention. Since I've been working on my own simulation (ie Codling Moths) for the last year and a while I thought it was in my best interest to find out really what I've been doing wrong this whole time. The professor frowns on real-life situations encountered in every day life such as standing in line at a bank (queuing theory). Instead, he rather prefers to simulate things that can be turned into games (game theory). I think I like that last part. Sadly, I'm on a wait-list. Second on a waitlist, 6 others in line behind me. 20 people in the class. 18 of the registered students showed up to class, I took up seat 19. I hope I can get in.
Been reading TUX eZine. Nice read for casual Linux users.
-Wireless 'net working with my Linux partition. w00t
Tuesday, September 06, 2005
back at school
School has begun
Year 4 of my degree has just begun. I went to school today for the orientation, not because I felt I really needed to be oriented but because I need to win the tuition prize offered as a free raffle today. The free pizza lunch and rootbeer floats was a nice bonus, too. And seeing my friends and getting a hand finishing up my wireless setup in my Kubuntu partition.
I'd had the wireless setup 90% done. I just didn't know how to modprobe wlan0 and iwconfig, etc etc.
I'm performing my third motorcycle skills test tomorrow. Third because I failed it the first time and it expired a month after I passed it the second time. When I pass it tomorrow I'm good for 11 months from then (not a full year because I've waited a month since renewing my license already).
-No news, bye bye
Year 4 of my degree has just begun. I went to school today for the orientation, not because I felt I really needed to be oriented but because I need to win the tuition prize offered as a free raffle today. The free pizza lunch and rootbeer floats was a nice bonus, too. And seeing my friends and getting a hand finishing up my wireless setup in my Kubuntu partition.
I'd had the wireless setup 90% done. I just didn't know how to modprobe wlan0 and iwconfig, etc etc.
I'm performing my third motorcycle skills test tomorrow. Third because I failed it the first time and it expired a month after I passed it the second time. When I pass it tomorrow I'm good for 11 months from then (not a full year because I've waited a month since renewing my license already).
-No news, bye bye
Wednesday, August 31, 2005
naksup trip
Back from the vacation...
...and it really wasn't all too exciting. The drive took about 4 hours to get to our destination, and it wasn't a bad drive. But when you pay to stay a night at a hotel, or in our case a chalet, I guess it's nice to make the most of your time. But we got there just after 7pm and checkout was 11am. So it was pretty much just a place to stay before we moved on to the main accomodation.
That accomodation wasn't what I thought it would be, either. To stay at this inn we paid $30 more than the chalet, and a price increase like that tells me "Bed and Breakfast". But I was wrong. It was just an inn that charged more. Don't get me wrong, it was a nice place, but it would have been everything I was expecting I could leave there with a full stomache. At least this place didn't have checkout until noon.
The drive back was nice. What took us 4 hours on the way there took only 3 hours to get back. Now I get to sleep in "my own bed" and not have to worry about missing a checkout time. I can wander over to the cupboard and find some cereal when I'm ready and eat without having to drive into town to find somebody who will take my money in exchange for cooking me food.
-Always nice to be home
Oh, but wait. What's the deal with hotsprings anyway? It was just a small heated pool of water with another part of the pool blocked off, featuring hotter water. We didn't stay long because it didn't really hold our attention long enough. Next time we do a vacation, it's going to be some place with a beach-front and something to do at night.
-Good to be home.
...and it really wasn't all too exciting. The drive took about 4 hours to get to our destination, and it wasn't a bad drive. But when you pay to stay a night at a hotel, or in our case a chalet, I guess it's nice to make the most of your time. But we got there just after 7pm and checkout was 11am. So it was pretty much just a place to stay before we moved on to the main accomodation.
That accomodation wasn't what I thought it would be, either. To stay at this inn we paid $30 more than the chalet, and a price increase like that tells me "Bed and Breakfast". But I was wrong. It was just an inn that charged more. Don't get me wrong, it was a nice place, but it would have been everything I was expecting I could leave there with a full stomache. At least this place didn't have checkout until noon.
The drive back was nice. What took us 4 hours on the way there took only 3 hours to get back. Now I get to sleep in "my own bed" and not have to worry about missing a checkout time. I can wander over to the cupboard and find some cereal when I'm ready and eat without having to drive into town to find somebody who will take my money in exchange for cooking me food.
-Always nice to be home
Oh, but wait. What's the deal with hotsprings anyway? It was just a small heated pool of water with another part of the pool blocked off, featuring hotter water. We didn't stay long because it didn't really hold our attention long enough. Next time we do a vacation, it's going to be some place with a beach-front and something to do at night.
-Good to be home.
Monday, August 29, 2005
pixelperfectilicious
Back from the dead
I don't know what caused it in the first place, but my dead pixel has fixed itself. It's functioning as normal, no more blue dot on dark backgrounds.
Homeless
I did the walkout with the landlord today and handed over the keys. I have no home any longer. For the next two weeks I'll be sharing the bottom bunk in my girlfriends brothers room. School starts some time between now and then. And finally, I'll be able to move into my new home.
-Vacation at the HotSprings for the next couple nights
I don't know what caused it in the first place, but my dead pixel has fixed itself. It's functioning as normal, no more blue dot on dark backgrounds.
Homeless
I did the walkout with the landlord today and handed over the keys. I have no home any longer. For the next two weeks I'll be sharing the bottom bunk in my girlfriends brothers room. School starts some time between now and then. And finally, I'll be able to move into my new home.
-Vacation at the HotSprings for the next couple nights
Wednesday, August 24, 2005
dead pixel
THE HORROR!
My first dead pixel. My monitor on my laptop has its first dead pixel. Those of you who own a Sony PSP (Playstation Portable) know what I'm talking about. I've got one dead pixel in the upper left quadrant of my screen. It's a single blue pixel and it shows up on black and other dark colors. It's terrible. I just hope nothing more comes of this. I can think of no reason it should just appear like it did. It wasn't there 15 minutes ago. I just set the laptop down, made juice and came back and there it was.
-It's not going away.
My first dead pixel. My monitor on my laptop has its first dead pixel. Those of you who own a Sony PSP (Playstation Portable) know what I'm talking about. I've got one dead pixel in the upper left quadrant of my screen. It's a single blue pixel and it shows up on black and other dark colors. It's terrible. I just hope nothing more comes of this. I can think of no reason it should just appear like it did. It wasn't there 15 minutes ago. I just set the laptop down, made juice and came back and there it was.
-It's not going away.
Friday, August 19, 2005
burneded
Camp
You busy yourself preparing a campfire, lighting it expertly ... it ignites instantly. Orange and red flames shoot up from the timber.
Flames lick at your clothing and it begins to smolder.
OH NO! You have caught fire!
-crispy
You busy yourself preparing a campfire, lighting it expertly ... it ignites instantly. Orange and red flames shoot up from the timber.
Flames lick at your clothing and it begins to smolder.
OH NO! You have caught fire!
-crispy
Tuesday, August 16, 2005
basementsuite
Basement Suite
My girlfriend and I looked at a basement suite yesterday in the evening. We were scheduled to be the first people to look, but when we arrived it was clear we weren't the only ones there. 3 groups had been shown through by the time we arrived, one was still hanging around building raport with one half of the couple showing the suite. Another man arrived as we did and was shown the suite at the same time as us.
It was a great looking place, it has a natural gas fireplace (one that you can turn on and off) and nice carpet. A big(ger) bathroom (than the one we have here) and it was below the ground. That in itself should be enough for us, and hopefully it keeps cool without running up the electricity. Well, at least that was the plan. When we left we had the feeling the couple was telling everyone that "these are the people I told you I liked."
So we left there with a little hope, but only a little. It was nice to hear this morning when they called us back saying it was a choice between us and another young couple. And even better when they called back 6 hours later asking us if we were really serious about the suite and could pay an additional pet deposit. We have the suite and make plans tomorrow.
-Was starting to feel unlucky with the whole house-finding thing
My girlfriend and I looked at a basement suite yesterday in the evening. We were scheduled to be the first people to look, but when we arrived it was clear we weren't the only ones there. 3 groups had been shown through by the time we arrived, one was still hanging around building raport with one half of the couple showing the suite. Another man arrived as we did and was shown the suite at the same time as us.
It was a great looking place, it has a natural gas fireplace (one that you can turn on and off) and nice carpet. A big(ger) bathroom (than the one we have here) and it was below the ground. That in itself should be enough for us, and hopefully it keeps cool without running up the electricity. Well, at least that was the plan. When we left we had the feeling the couple was telling everyone that "these are the people I told you I liked."
So we left there with a little hope, but only a little. It was nice to hear this morning when they called us back saying it was a choice between us and another young couple. And even better when they called back 6 hours later asking us if we were really serious about the suite and could pay an additional pet deposit. We have the suite and make plans tomorrow.
-Was starting to feel unlucky with the whole house-finding thing
Sunday, August 14, 2005
Chemical Warfare
Acid Burn...
...in my lungs and eyes. Coming home from grocery shopping just now I was walking up the far steps, rather than taking the elevator in the middle of the building. I've got my grocery bags and they are all in one hand so I can open doors along the way. Coming up to the landing of the first flight of stairs I inhaled something I wish not to inhale again. My landlord is coming down from the third floor and asks me, "Do you smell something burning."
I try to reply, do the normal 'inhale so you have a breath to speak with' and all I come out with is a thought 'Ack, my lungs and nose are burning. Cough! COUGH!' and I manage to squeek out "no,butican'tbreath" *COUGH*COUGH* where I pick up my pace, try to keep my head low (in case it's like smoke, where there's a layer you can get under so you can still breath).
I managed to get into my apartment (on the top (third) floor) and set my bags down. I went to the balcony and inhaled clean air (while still coughing up my lungs) for a few minutes. I can breath in my apartment at the moment, mostly, but I can sense it creeping in here. Some breaths I inhale breath in a good plume of this shit, whatever it is. Probably cancer causing, if it's not somebody's suicidal idea of a sick joke.
And what am I still doing in my apartment blogging this when my eyes have become reddened and I've coughed so much I've almost thrown up twice. Like I said, I can still breath in my apartment, but when I poked my head out in the hall again I almost collapsed for my own safety looking for clean air to breath. And my landlord is walking around breathing in like he's immune to it. He thought it was from my apartment but I'd invite him in if he doesn't believe me. He's looking for the source as is. And I've got to get out of this place, so I'm holding my breath while running down three stories of this apartment building to the parking lot below. I have to get more boxes to pack with anyway.
-Now I've got this powdery texture in my mouth.
[Update]
Well shit, the fire department is here knocking on a door down the hall from me, it turns out that's the source. My neighbors across the hall have left their apartment, taking their cat with them. I've got two cats, and one carry case. If it comes down to it I'll take both cats away in the carry case. And my laptop.
I went out on my balcony again to breath and Diane, the managers wife, asked how I was doing. She was talking with the fire chief and they didn't seem to find it important to yell at me "Get the hell out of the building" so I guess I'll stay here (for the cats safety) until they tell me I've got to leave. Fuck it, I'm turning on my vents (over the stove and in the bathroom) right now and taking my cats downstairs. This sucks, I'm starting to cough again. My computer where I'm sitting is 20 feet from the door, it's still creeping in.
[Verdict]
Brian, the manager of the building, kicked some people out this morning soon after I left to drive my girlfriend to work. And a good thing she worked today, too, because Cystic Fibrosis and fucked up air do not mix. She's a tough girl but that stuff brought me to my knees.
Here's what happened. After Brian kicked the people out of the building (squatters in a friends room or whatever) the people didn't take it lightly. After they appeared to leave, but didn't really, they sprayed mace/bear/pepper-spray throughout the hallways and ran out of the buildings with their mouths covered. That's the story I got from Brian and his wife. The fire department came by, inspected the place, decided it was pepper-spray as well. 'Interrogated' the woman in the room that was busted up this morning and she made up some story about a friend of hers having a can of mace in her purse that must have exploded by accident blah blah blah. The fire department flushed out the halls with industrial fans and all is well now. I just had to wait downstairs for 10 minutes with the cats (one of which gouged a big red streak in my gut with his claw) while the halls dispersed.
-I can now leave the cats safely at home while I get packing boxes
...in my lungs and eyes. Coming home from grocery shopping just now I was walking up the far steps, rather than taking the elevator in the middle of the building. I've got my grocery bags and they are all in one hand so I can open doors along the way. Coming up to the landing of the first flight of stairs I inhaled something I wish not to inhale again. My landlord is coming down from the third floor and asks me, "Do you smell something burning."
I try to reply, do the normal 'inhale so you have a breath to speak with' and all I come out with is a thought 'Ack, my lungs and nose are burning. Cough! COUGH!' and I manage to squeek out "no,butican'tbreath" *COUGH*COUGH* where I pick up my pace, try to keep my head low (in case it's like smoke, where there's a layer you can get under so you can still breath).
I managed to get into my apartment (on the top (third) floor) and set my bags down. I went to the balcony and inhaled clean air (while still coughing up my lungs) for a few minutes. I can breath in my apartment at the moment, mostly, but I can sense it creeping in here. Some breaths I inhale breath in a good plume of this shit, whatever it is. Probably cancer causing, if it's not somebody's suicidal idea of a sick joke.
And what am I still doing in my apartment blogging this when my eyes have become reddened and I've coughed so much I've almost thrown up twice. Like I said, I can still breath in my apartment, but when I poked my head out in the hall again I almost collapsed for my own safety looking for clean air to breath. And my landlord is walking around breathing in like he's immune to it. He thought it was from my apartment but I'd invite him in if he doesn't believe me. He's looking for the source as is. And I've got to get out of this place, so I'm holding my breath while running down three stories of this apartment building to the parking lot below. I have to get more boxes to pack with anyway.
-Now I've got this powdery texture in my mouth.
[Update]
Well shit, the fire department is here knocking on a door down the hall from me, it turns out that's the source. My neighbors across the hall have left their apartment, taking their cat with them. I've got two cats, and one carry case. If it comes down to it I'll take both cats away in the carry case. And my laptop.
I went out on my balcony again to breath and Diane, the managers wife, asked how I was doing. She was talking with the fire chief and they didn't seem to find it important to yell at me "Get the hell out of the building" so I guess I'll stay here (for the cats safety) until they tell me I've got to leave. Fuck it, I'm turning on my vents (over the stove and in the bathroom) right now and taking my cats downstairs. This sucks, I'm starting to cough again. My computer where I'm sitting is 20 feet from the door, it's still creeping in.
[Verdict]
Brian, the manager of the building, kicked some people out this morning soon after I left to drive my girlfriend to work. And a good thing she worked today, too, because Cystic Fibrosis and fucked up air do not mix. She's a tough girl but that stuff brought me to my knees.
Here's what happened. After Brian kicked the people out of the building (squatters in a friends room or whatever) the people didn't take it lightly. After they appeared to leave, but didn't really, they sprayed mace/bear/pepper-spray throughout the hallways and ran out of the buildings with their mouths covered. That's the story I got from Brian and his wife. The fire department came by, inspected the place, decided it was pepper-spray as well. 'Interrogated' the woman in the room that was busted up this morning and she made up some story about a friend of hers having a can of mace in her purse that must have exploded by accident blah blah blah. The fire department flushed out the halls with industrial fans and all is well now. I just had to wait downstairs for 10 minutes with the cats (one of which gouged a big red streak in my gut with his claw) while the halls dispersed.
-I can now leave the cats safely at home while I get packing boxes
Friday, August 12, 2005
moving
Back to the topic at hand
I'm moving. My girlfriend and I are getting out of our little apartment and are attempting to move into a little basement suite. The problem with moving is you've got to bring all the stuff you accumulated in your old place to your new place. And in our case, we now have two cats. It was simple enough to find a place beforehand, we just happened to move into an apartment that allows cats. Now, however, no-one wants to take these cats. Until today; I think I may have found a home for the four of us. A basement suite that has us pay 40% of the utilities and has a bath tub. We don't pay utilities where we're at, but I guess it's something we'll have to do if we want to bring the cats with us.
-Gotta grab more boxes this weekend
I'm moving. My girlfriend and I are getting out of our little apartment and are attempting to move into a little basement suite. The problem with moving is you've got to bring all the stuff you accumulated in your old place to your new place. And in our case, we now have two cats. It was simple enough to find a place beforehand, we just happened to move into an apartment that allows cats. Now, however, no-one wants to take these cats. Until today; I think I may have found a home for the four of us. A basement suite that has us pay 40% of the utilities and has a bath tub. We don't pay utilities where we're at, but I guess it's something we'll have to do if we want to bring the cats with us.
-Gotta grab more boxes this weekend
Wednesday, August 10, 2005
awk stuff
Hey, I learned something new today
Here's a file I have, this is just a small example of it:
*** Week 1 @@@ sfm_146 smm_146 wfm_0 wmm_0
1989,3479 m1 s121 e141
2449,3503 m1 s121 e141
2555,3539 m1 s121 e141
2652,2849 m1 s121 e141
2349,2229 m1 s121 e141
2617,3004 m1 s121 e141
2713,3097 m1 s121 e141
3356,2684 m1 s121 e141
2725,2193 m1 s121 e141
2016,1992 m1 s121 e141
2813,2569 m1 s121 e141
3000,2796 m1 s121 e141
2851,2628 m1 s121 e141
2320,3693 m1 s121 e141
2270,3087 m1 s121 e141
2538,2173 m1 s121 e141
2647,2702 m1 s121 e141
2669,2445 m1 s121 e141
2217,2498 m1 s121 e141
2565,3155 m1 s121 e141
3212,2145 m1 s122 e142
2338,1808 m1 s122 e142
2009,2752 m1 s122 e142
4142,2074 m1 s122 e142
2605,2691 m1 s122 e142
2756,2689 m1 s122 e142
2337,2698 m1 s121 e142
2959,2286 m1 s121 e142
2554,3128 m1 s122 e142
2761,2578 m1 s121 e142
2894,2183 m1 s122 e142
2789,2265 m1 s122 e142
2315,2834 m1 s122 e142
2846,2133 m1 s121 e142
3218,2455 m1 s122 e142
2023,2796 m1 s121 e142
2683,3119 m1 s122 e142
2570,3545 m1 s122 e142
That is the output file from my program regarding moth matings and their locations. The first pair is the (x,y) location of the mating. The second number beginning with 'm' is the mate type, 1 for sterile:sterile, 2 for sterile:wild and 3 for wild:wild matings. The third bit that starts with the 's' is the start time of the mating session. The 'e' is the time they finished mating. My moths are pretty in sync with each other, maybe that's something I should fix later.
What I needed from that file was all the mate start times. I had to find an easy way to parse that data, but how to do it? A friend of mine suggested a quick 'awk' command on it that went something like this:
cat _MatingLocations.txt | awk '{print $3}' > tmp.txt
which just takes the 'third word' from the file and spits it out, in this case I piped it to the tmp.txt file. The tmp.txt file looks like this now:
1
s121
s121
s121
s121
s121
s121
s121
s121
s121
s121
s121
s121
s121
s121
s121
s121
s121
s121
s121
s121
s122
s122
s122
s122
s122
s122
s121
s121
s122
s121
And as you can see, it's got a '1' printed at the very top. You might have noticed that is the third word from the first line '*** Week 1 @@@ sfm_146 smm_146 wfm_0 wmm_0' and is something I might not want. So now I grep'd the file to output only the files with the 's' in it.
grep s tmp.txt > filter.txt
which looks the same as above, just without the 1 at the top. Now I want to get rid of the 's' in front of the values so I can run those values through another program to get the mean value. To remove the 's' I simply grab the substring of it like this
cat filter.txt | awk '{print substr($0,2)}' > inp.dat
which outputs data like this
121
121
121
121
121
...
and can now be read by other programs as numerical values. awk made it a whole lot easier to parse the files than writing a custom script in, say, matlab to do it for me.
And speaking of matlab, I could then open matlab in a terminal 'matlab -nodesktop' then load the data 'load inp.dat' and then calculate the average of the values 'mean(inp)' and then save the data of the average value 'save -ascii avgData.dat'
And to grab a few words from the raw text file I could
cat file.txt | awk '{print $2 " " $3 " " $4}'
-Thanks awk
Here's a file I have, this is just a small example of it:
*** Week 1 @@@ sfm_146 smm_146 wfm_0 wmm_0
1989,3479 m1 s121 e141
2449,3503 m1 s121 e141
2555,3539 m1 s121 e141
2652,2849 m1 s121 e141
2349,2229 m1 s121 e141
2617,3004 m1 s121 e141
2713,3097 m1 s121 e141
3356,2684 m1 s121 e141
2725,2193 m1 s121 e141
2016,1992 m1 s121 e141
2813,2569 m1 s121 e141
3000,2796 m1 s121 e141
2851,2628 m1 s121 e141
2320,3693 m1 s121 e141
2270,3087 m1 s121 e141
2538,2173 m1 s121 e141
2647,2702 m1 s121 e141
2669,2445 m1 s121 e141
2217,2498 m1 s121 e141
2565,3155 m1 s121 e141
3212,2145 m1 s122 e142
2338,1808 m1 s122 e142
2009,2752 m1 s122 e142
4142,2074 m1 s122 e142
2605,2691 m1 s122 e142
2756,2689 m1 s122 e142
2337,2698 m1 s121 e142
2959,2286 m1 s121 e142
2554,3128 m1 s122 e142
2761,2578 m1 s121 e142
2894,2183 m1 s122 e142
2789,2265 m1 s122 e142
2315,2834 m1 s122 e142
2846,2133 m1 s121 e142
3218,2455 m1 s122 e142
2023,2796 m1 s121 e142
2683,3119 m1 s122 e142
2570,3545 m1 s122 e142
That is the output file from my program regarding moth matings and their locations. The first pair is the (x,y) location of the mating. The second number beginning with 'm' is the mate type, 1 for sterile:sterile, 2 for sterile:wild and 3 for wild:wild matings. The third bit that starts with the 's' is the start time of the mating session. The 'e' is the time they finished mating. My moths are pretty in sync with each other, maybe that's something I should fix later.
What I needed from that file was all the mate start times. I had to find an easy way to parse that data, but how to do it? A friend of mine suggested a quick 'awk' command on it that went something like this:
cat _MatingLocations.txt | awk '{print $3}' > tmp.txt
which just takes the 'third word' from the file and spits it out, in this case I piped it to the tmp.txt file. The tmp.txt file looks like this now:
1
s121
s121
s121
s121
s121
s121
s121
s121
s121
s121
s121
s121
s121
s121
s121
s121
s121
s121
s121
s121
s122
s122
s122
s122
s122
s122
s121
s121
s122
s121
And as you can see, it's got a '1' printed at the very top. You might have noticed that is the third word from the first line '*** Week 1 @@@ sfm_146 smm_146 wfm_0 wmm_0' and is something I might not want. So now I grep'd the file to output only the files with the 's' in it.
grep s tmp.txt > filter.txt
which looks the same as above, just without the 1 at the top. Now I want to get rid of the 's' in front of the values so I can run those values through another program to get the mean value. To remove the 's' I simply grab the substring of it like this
cat filter.txt | awk '{print substr($0,2)}' > inp.dat
which outputs data like this
121
121
121
121
121
...
and can now be read by other programs as numerical values. awk made it a whole lot easier to parse the files than writing a custom script in, say, matlab to do it for me.
And speaking of matlab, I could then open matlab in a terminal 'matlab -nodesktop' then load the data 'load inp.dat' and then calculate the average of the values 'mean(inp)' and then save the data of the average value 'save -ascii avgData.dat'
And to grab a few words from the raw text file I could
cat file.txt | awk '{print $2 " " $3 " " $4}'
-Thanks awk
Sunday, August 07, 2005
12 boxes
12 boxes and hardly a dent
My girlfriend and I, along with our two cats, are out of this apartment at the end of this month. We don't know where we're going to end up. We've given our notice that we'll move out at the end of the month, but we haven't found a place to move into yet. If it comes down to it, we've got a 3 bedroom place to move into with another couple, temporarily.
We've packed up most of the pictures on the walls, the books on both our bookshelves, candles, ornaments, etc. The little stuff. 12 boxes worth, and it appears we've hardly made a dent. Though that would comprise the majority of the things to pack. Our clothing dressers will remain full and we'll move them as one.
There's the entertainment stand with our TV and stereo. Got out appliences to pack up. The bigger stuff. I think we've done a good job. Nice to start early so we're not in such a frenzy later. And we've got storage to put all this into, in advance, so that's nice. And it's free to us.
-Hope we find a nice place to move into, soon
My girlfriend and I, along with our two cats, are out of this apartment at the end of this month. We don't know where we're going to end up. We've given our notice that we'll move out at the end of the month, but we haven't found a place to move into yet. If it comes down to it, we've got a 3 bedroom place to move into with another couple, temporarily.
We've packed up most of the pictures on the walls, the books on both our bookshelves, candles, ornaments, etc. The little stuff. 12 boxes worth, and it appears we've hardly made a dent. Though that would comprise the majority of the things to pack. Our clothing dressers will remain full and we'll move them as one.
There's the entertainment stand with our TV and stereo. Got out appliences to pack up. The bigger stuff. I think we've done a good job. Nice to start early so we're not in such a frenzy later. And we've got storage to put all this into, in advance, so that's nice. And it's free to us.
-Hope we find a nice place to move into, soon
Friday, August 05, 2005
1984 - orwell
Big Brother is watching you
I just read the first few pages of Orwell's book 1984 and this is what I think of it so far. The character, Winston, is who I've been introduced to. He's just come home from work and poured himself a glass of "Victory Gin". He's about to smoke a "Victory Cigarrette" and is about to write in an illegal diary. Well, nothing is illegal, as they say, in this society as there are no laws. But possession of such a thing would surely result in his punishment by either death or 25 years hard labour.
His apartment has a single camera mounted in it. The government is watching and listening to him at any given time. The same to all its citizens. Winston is about to write in his journal and is not sure who he's writing to. He writes a date, April 4th 1984, but is not sure if that's the correct year. Nobody knows for sure what the correct date, plus or minus a year, is any more. He decides to write about the movies he watched the night before.
It appears the government entertains its people with movies of war. Winston writes gleefully of witnessing a massacre of refugees; seeing a frightened man, viewed through the gun-barrels of a helicopter, shot full of holes while swimming away from the helicopter. Another of a woman in a boat full of children trying to calm her son, holding her arms around him as if that were enough to protect them from the bullets. And if that weren't enough, the 20 kg bomb dropped onto the boat would do them in. And he recalls a particular shot of a childs arm propelled into the air falling just short of a helicopters rotors.
Some society to live in. And this all within the first few pages of the book. Sounds like a book I should read, maybe not a happy book, but an important one none-the-less.
-When does Emmanuel Goldstein get introduced
I just read the first few pages of Orwell's book 1984 and this is what I think of it so far. The character, Winston, is who I've been introduced to. He's just come home from work and poured himself a glass of "Victory Gin". He's about to smoke a "Victory Cigarrette" and is about to write in an illegal diary. Well, nothing is illegal, as they say, in this society as there are no laws. But possession of such a thing would surely result in his punishment by either death or 25 years hard labour.
His apartment has a single camera mounted in it. The government is watching and listening to him at any given time. The same to all its citizens. Winston is about to write in his journal and is not sure who he's writing to. He writes a date, April 4th 1984, but is not sure if that's the correct year. Nobody knows for sure what the correct date, plus or minus a year, is any more. He decides to write about the movies he watched the night before.
It appears the government entertains its people with movies of war. Winston writes gleefully of witnessing a massacre of refugees; seeing a frightened man, viewed through the gun-barrels of a helicopter, shot full of holes while swimming away from the helicopter. Another of a woman in a boat full of children trying to calm her son, holding her arms around him as if that were enough to protect them from the bullets. And if that weren't enough, the 20 kg bomb dropped onto the boat would do them in. And he recalls a particular shot of a childs arm propelled into the air falling just short of a helicopters rotors.
Some society to live in. And this all within the first few pages of the book. Sounds like a book I should read, maybe not a happy book, but an important one none-the-less.
-When does Emmanuel Goldstein get introduced
Tuesday, August 02, 2005
girlfriends birthday
Happy Birthday!!

I know you wanted one of these:

and we will. We'll get one when we've got the time and space. Happy birthday, sweetheart.
-Lots of love, from your guy.

I know you wanted one of these:

and we will. We'll get one when we've got the time and space. Happy birthday, sweetheart.
-Lots of love, from your guy.
Monday, August 01, 2005
xmodmap thinger
Buttons with my laptop
I found a nice little config to get the volume control buttons working on my laptop. Note, this config file will probably only work on an HP zv5320, but the way to set up the config to automatically run after every reboot will probably be a help to you. The help came from this page particularly, so thanks a lot to the author.
Create a file called .Xmodmap in your home directory
> sudo emacs /home/user/.Xmodmap
and add these lines
---
Problem was, I couldn't get the script to load up every time the computer rebooted. I would have to load the script via
> xmodmap ~/.Xmodmap
in order for the buttons to work again. You can imagine that it would suck to havae to do that every time. I don't know because I have it set to do it automatically. Here's what I did (and no other way worked for me, I tried quite a few). So now is where this works for anybody on any system, at least that's the aim. To run the command xmodmap ~/.Xmodmap at the beginning of every session, instead of manually typing it into a terminal yourself, add the following to the end of your .bash_profile from your home directory
if [ -f ~/.Xmodmap ]; then
xmodmap ~/.Xmodmap
fi
save the .bash_profile and you should be good to go.
-bash_profile is good for everything! (at least lots of things)
I found a nice little config to get the volume control buttons working on my laptop. Note, this config file will probably only work on an HP zv5320, but the way to set up the config to automatically run after every reboot will probably be a help to you. The help came from this page particularly, so thanks a lot to the author.
Create a file called .Xmodmap in your home directory
> sudo emacs /home/user/.Xmodmap
and add these lines
---
keycode 174 = XF86AudioLowerVolumeAgain, it's only going to work for an HP zv5320 laptop.
keycode 160 = XF86AudioMute
keycode 176 = XF86AudioRaiseVolume
keycode 178 = XF86HomePage
keycode 223 = XF86Standby
keycode 162 = XF86AudioPlay
keycode 164 = XF86AudioStop
keycode 144 = XF86AudioPrev
keycode 153 = XF86AudioNext
---
Problem was, I couldn't get the script to load up every time the computer rebooted. I would have to load the script via
> xmodmap ~/.Xmodmap
in order for the buttons to work again. You can imagine that it would suck to havae to do that every time. I don't know because I have it set to do it automatically. Here's what I did (and no other way worked for me, I tried quite a few). So now is where this works for anybody on any system, at least that's the aim. To run the command xmodmap ~/.Xmodmap at the beginning of every session, instead of manually typing it into a terminal yourself, add the following to the end of your .bash_profile from your home directory
if [ -f ~/.Xmodmap ]; then
xmodmap ~/.Xmodmap
fi
save the .bash_profile and you should be good to go.
-bash_profile is good for everything! (at least lots of things)
Friday, July 29, 2005
changing ips
Changing IPs
The computer I use in my office at school has this habit of renewing its IP every time it reboots. It's not the computers fault, it's network services fault for not giving static IPs to the computers. My biggest problem with that is I can never figure out what the new IP is without a little bit of work. Well, no more! It's easy from here on out.
The solution was simple. Have the computer email me the new IP every time it reboots itself. And since it's emailed to me, I can access that from anywhere as well. Here's how it's done.
I wanted to edit/create the S99local script in /etc/rc2.d
In my case, I had to create it.
> ls /etc/rc2.d
comes up with a whole lot of S* scripts. I didn't see the S99local so I created it.
> sudo emacs /etc/rc2.d/S99local
and wrote the following
------
#!bin/sh
ifconfig | grep inet | mail -s "new IP for work computer" myEmailAddress@theHost.something
end
------
The above is a shell script, that's why it starts with #!bin/sh and the rest is kind of self explanitory. And if not, just know that it does work.
I then changed the file via
> sudo chmod a+x S99local
so it can be run by the shell. Now every time the system restarts it emails the new IP to my gmail account. That makes it a lot easier than how I was doing it. I used to scan the whole university computer system looking for computers with an open ssh port 22. I'd pipe the information to a text file and pull out entries with 'open ssh' and try to SSH my account on there. That took a while because there are a lot of computers on the system with an open port 22.
-Much easier now
The computer I use in my office at school has this habit of renewing its IP every time it reboots. It's not the computers fault, it's network services fault for not giving static IPs to the computers. My biggest problem with that is I can never figure out what the new IP is without a little bit of work. Well, no more! It's easy from here on out.
The solution was simple. Have the computer email me the new IP every time it reboots itself. And since it's emailed to me, I can access that from anywhere as well. Here's how it's done.
I wanted to edit/create the S99local script in /etc/rc2.d
In my case, I had to create it.
> ls /etc/rc2.d
comes up with a whole lot of S* scripts. I didn't see the S99local so I created it.
> sudo emacs /etc/rc2.d/S99local
and wrote the following
------
#!bin/sh
ifconfig | grep inet | mail -s "new IP for work computer" myEmailAddress@theHost.something
end
------
The above is a shell script, that's why it starts with #!bin/sh and the rest is kind of self explanitory. And if not, just know that it does work.
I then changed the file via
> sudo chmod a+x S99local
so it can be run by the shell. Now every time the system restarts it emails the new IP to my gmail account. That makes it a lot easier than how I was doing it. I used to scan the whole university computer system looking for computers with an open ssh port 22. I'd pipe the information to a text file and pull out entries with 'open ssh' and try to SSH my account on there. That took a while because there are a lot of computers on the system with an open port 22.
-Much easier now
Wednesday, July 27, 2005
You suck education is not for you
You suck. Education is above you
So I got a reply in the mail today telling me I suck and my education will not be offered me this year. Well, in a nutshell that's what it said.
I applied for my student loan, filled out all my applications to specification. Had my girlfriend fill out her spousal form to send it all away. Got my reply and it said, "You should have enough money saved and enough money from your girlfriend over the course of the year that you can pay for school yourself. Kthxbye."
So now I get $0 for my student loan and don't know what's going to happen. I'm sure I'll still go, but I'll be getting my money more inconveniently.
-Stupid government
So I got a reply in the mail today telling me I suck and my education will not be offered me this year. Well, in a nutshell that's what it said.
I applied for my student loan, filled out all my applications to specification. Had my girlfriend fill out her spousal form to send it all away. Got my reply and it said, "You should have enough money saved and enough money from your girlfriend over the course of the year that you can pay for school yourself. Kthxbye."
So now I get $0 for my student loan and don't know what's going to happen. I'm sure I'll still go, but I'll be getting my money more inconveniently.
-Stupid government
awakechocolate
Awake now
Augustus Gloop looks like he has been created with the help of a computer. The movie was awesome. Tim Burton plays off Charlie like he has a dark secret love of hurting others. Sadistic, maybe. The only movie to leave such an impression on me in a long time.
-Great fun
Augustus Gloop looks like he has been created with the help of a computer. The movie was awesome. Tim Burton plays off Charlie like he has a dark secret love of hurting others. Sadistic, maybe. The only movie to leave such an impression on me in a long time.
-Great fun
Subscribe to:
Posts (Atom)