Friday, January 9, 2009
Wednesday, January 7, 2009
The Music of Four Loves Four - 2008
- Radiohead
- Coldplay
- Van Morrison
- Pearl Jam
- Death Cab for Cutie
- Kanye West
- Mat Kearney
- Counting Crows
- The Decemberists
- Incubus
- Tokyo Police Club
- Say Anything
- Owen
- Sufjan Stevens
- Someone Still Loves You Boris Yeltsin
- Vampire Weekend
- Royksopp
- The Appleseed Cast
- Pompeii
- Nada Surf
- Radiohead
- Death Cab for Cutie
- Christopher O'Riley
- Dave Matthew Band
- Broken Social Scene
- Snow Patrol
- Jack Johnson
- Feist
- Van Morrison
- The Decemberists
Monday, January 5, 2009
I'm Boycotting the Progressive Insurance Commercial Girl...
Just so I know what I'm working against, I did a little detective work. Her name is Stephanie Courtney and here is a list of films and works I will not be watching until Progressive takes my demands suriously and ends these commercials.
Join my Cause.
-migs out
btw, I will be entertaining myself at the Nova/Seton Hall game tomorrow night at the ROCK and then watching the premier of Scrubs on ABC.
Thursday, December 18, 2008
Pretty Plots in MATLAB
figure
set(gca,'fontsize',14)
set(gcf, 'PaperSize', [8. 6.],'PaperPositionMode', 'auto');
plot(X,Y,'k^','markersize',10,'markerfacecolor','auto')
legend('mylegend','location','northeast');
xlabel('myxlabel','Interpreter','latex','fontsize',16);
ylabel('myylabel','Interpreter','latex','fontsize',16)
AXIS([xmin xmax ymin ymax])
print('-r600','-dpdf',['filename','.pdf'])
Alright, a quick rundown.
1. The 'figure' command is letting MATLAB know that we're making a picture with all the following attributes.
2. The 'set gca' command is setting the axes, which have the default handle 'gca', to have a font size of 14 here. This will control the size of the numbering on the axes, as well as the size of the font in the legend.
3. The 'set gcf' command is setting the paper size to 8" by 6", a size I find works well with the default figure output of MATLAB. This will prevent you from having to crop the plot later in a third-party photo editor.
4. The 'plot' command lists the X and Y arrays youd like to plot, 'k^' plots black upward facing triangles in a 'marker size' of 10pt, and automatically filled.
The 'legend' command puts in your legend, one entry per pair of vectors being plotted, in the northwest position.
5. The 'xlabel' and 'ylabel' commands are pretty straightforward, but the interpretter command displays the labels in the default LaTeX font instead of the MATLAB font. You can use the '$$' pairing to put in maths.
6. The 'axis' command sets the range for x and y, just comment this out if you like what MATLAB does.
7. The 'print' command will save your figure as .pdf with the filename you specify in the current directory (where your .m file is). Here, you can always specficy a path if you'd like to save figures in a different folder.
Still to come, using str2num and num2str to automatically number plots that are part of a for loop, or to name output graphs based on input data.
Wednesday, November 19, 2008
MATLAB: Don't ', transpose(it)
k = int(int(B'*D*B,r,-0.5,0.5),s,-0.5,0.5)B is a 3xn matrix of shape functions and D a 3x3 relationship of Modulus of Elasticity and Poisson's ratio. There is obviously more to this code, including the calculations of stress and strain and the writing of an output file.
Running the code using the prime ('), the code took 143.106 seconds to run. I was initally confused by how long it took because the matrices were not that large. I then heard about the function transpose() and decided to use that. In code form:
k = int(int(transpose(B)*D*B,r,-0.5,0.5),s,-0.5,0.5)This took only 19.735 seconds to run. So digging a little further, the operator ', also checks for complex conjugates of the matrix as well.
In conclusion, if you know that you are not dealing with complex numbers, you may want to use the transpose function and not its operator.
Tip: To time the running time of your code, put tic on the top line and toc on the last line.
Tuesday, November 18, 2008
SCP + SSH: Copying files from Windows to Linux
sudo apt-get install openssh-server
ssh localhost
scp report.pdf user@serverip:"/home/user/Fall 2008/" .
Saturday, October 11, 2008
Conky: Display Last Pidgin Message
The DBus method that listens for the received messages was chocking conky and not allowing the conky script to load correctly. So I had to create two files. getim.py would run at startup, listen for a new message and then write that message to a data file. lastim.py would be executed within conky and check the data file for the new message. I know its not real efficient and redundant but it just works. If you have any brilliant ideas please let me know.
Here is the getim.py file:
#!/usr/bin/python
# ----- GETIM.PY // LISTEN FOR AN RECEIVED MESSAGE ------------#
################################################################
# MOST OF THIS SCRIPT WAS TAKEN FROM THE PIDGIN DEVELOPER WIKI#
# PLEASE VISIT http://developer.pidgin.im/ FOR MORE INFORMATION#
################################################################
def conky_im(account, sender, message, conversation, flags):
reg = '<(.|\n)+?>' # REGEX FOR HTML TAGS
message = re.sub(reg,'',message) # REMOVE HTML TAGS
sender = sender.split("@")[0] # GET GCHAT NAME
message = message[0:24] # LIMIT TO 25 CHARS
file = ' ' # LOCATION OF DATA FILE
fim = open(file,"w")
IM = sender + " said: " + message
fim.write(IM)
fim.close()
import dbus, gobject, re
from dbus.mainloop.glib import DBusGMainLoop
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
bus = dbus.SessionBus()
bus.add_signal_receiver(conky_im,
dbus_interface="im.pidgin.purple.PurpleInterface",
signal_name="ReceivedImMsg")
loop = gobject.MainLoop()
loop.run()
Copy and paste the following and save as lastim.py:
#!/usr/bin/python
# SHOW LAST IM
f=" " # REPLACE WITH YOUR DATA FILE. ie.CONKYIM.DAT
fim = open(f,'r')
im = fim.read()
print im
fim.close
Finally, add this to your .conkyrc script
${execi 1 python ~/scripts/lastim.py}
Any questions/comments let me know. Here is a screen shot of what my conky looks like:
Thursday, September 11, 2008
Top Ten Radiohead Songs
- There There
- Karma Police
- House of Cards
- Fake Plastic Trees
- Paranoid Android
- Everything in its Right Place
- True Love Waits
- High and Dry
- Idioteque
- Bodysnatchers
in pitch dark i go walking in your landscape.
broken branches trip me as i speak.
just because you feel it doesnt mean it's there.
just because you feel it doesnt mean it's there.
there's always a siren
singing you to shipwreck.
(don't reach out, don't reach out)
steer away from these rocks
we'd be a walking disaster.
(don't reach out, don't reach out)
just because you feel it doesn't mean it's there.
(there's someone on your shoulder)
just because you feel it doesn't mean it's there.
(there's someone on your shoulder)
there there
why so green and lonely?
heaven sent you to me.
we are accidents
waiting waiting to happen.
we are accidents
waiting waiting to happen.
Karma police
arrest this man,
he talks in maths,
he buzzes like a fridge,
he's like a detuned radio.
Karma police
arrest this girl,
her Hitler hairdo
is making me feel ill
and we have crashed her party.
This is what you get,
this is what you get,
this is what you get,
when you mess with us.
Karma police
I've given all I can,
it's not enough,
I've given all I can
but we're still on the payroll.
This is what you get,
this is what you get,
this is what you get,
when you mess with us.
For a minute there
I lost myself, I lost myself.
Phew, for a minute there,
I lost myself, I lost myself.
For a minute there
I lost myself, I lost myself.
Phew, for a minute there,
I lost myself, I lost myself.
I don't want to be your friend
I just want to be your lover
No matter how it ends
No matter how it starts
Forget about your house of cards
And I'll do mine
Forget about your house of cards
And I'll do mine
Fall off the table,
Get swept under
Denial, denial
The infrastructure will collapse
Voltage spikes
Throw your keys in the bowl
Kiss your husband goodnight
Forget about your house of cards
And I'll do mine
Forget about your house of cards
And I'll do mine
Fall off the table,
And get swept under
Denial, denial
Denial, denial
Your ears should be burning
Denial, denial
Your ears should be burning
Denial, denial
A green plastic watering can
For a fake chinese rubber plant
In the fake plastic earth
That she bought from a rubber man
In a town full of rubber plans
To get rid of itself
It wears her out, it wears her out
It wears her out, it wears her out
She lives with a broken man
A cracked polystyrene man
Who just crumbles and burns
He used to do surgery
On girls in the eighties
But gravity always wins
And it wears him out, it wears him out
It wears him out, it wears him out
She looks like the real thing
She tastes like the real thing
My fake plastic love
But I can't help the feeling
I could blow through the ceiling
If I just turn and run
And it wears me out, it wears me out
It wears me out, it wears me out
And if I could be who you wanted
If I could be who you wanted
All the time, all the time
Please could you stop the noise, I'm trying to get some rest
From all the unborn chicken voices in my head
What's that...? (I may be paranoid, but not an android)
What's that...? (I may be paranoid, but not an android)
When I am king, you will be first against the wall
With your opinion which is of no consequence at all
What's that...? (I may be paranoid, but no android)
What's that...? (I may be paranoid, but no android)
Ambition makes you look pretty ugly
Kicking and squealing gucci little piggy
You don't remember
You don't remember
Why don't you remember my name?
Off with his head, man
Off with his head, man
Why don't you remember my name?
I guess he does....
Rain down, rain down
Come on rain down on me
From a great height
From a great height... height...
Rain down, rain down
Come on rain down on me
From a great height
From a great height... height...
Rain down, rain down
Come on rain down on me
That's it, sir
You're leaving
The crackle of pigskin
The dust and the screaming
The yuppies networking
The panic, the vomit
The panic, the vomit
God loves his children, God loves his children, yeah!
Kid A, Kid A
Kid A, Kid A
Everything
Everything
Everything
Everything in its right place
In its right place
In its right place
In its right place
Yesterday I woke up sucking a lemon
Yesterday I woke up sucking a lemon
Yesterday I woke up sucking a lemon
Yesterday I woke up sucking a lemon
Everything
Everything
Everything
Everything in its right place
In its right place
In its right place
Right place
There are two colours in my head
There are two colours in my head
What, what is that you tried to say?
What, what was that you tried to say?
Tried to say
Tried to say
Tried to say
Tried to say
Everything in its right place...
I'll drown my beliefs
To have you be in peace
I'll dress like your niece
To wash your swollen feet
Just don't leave
Don't leave
I'm not living
I'm just killing time
Your tiny hands
Your crazy kitten smile
Just don't leave
Don't leave
And true love waits
In haunted attics
And true love lives
On lollipops and crisps
Just don't leave
Don't leave
Just don't leave
Don't leave
Two jumps in a week,
I bet you think that's pretty clever don't you boy?
Flying on your motorcycle,
watching all the ground beneath you drop
You'd kill yourself for recognition,
kill yourself to never, ever stop
You broke another mirror,
you're turning into something you are not
Don't leave me high, don't leave me dry
Don't leave me high, don't leave me dry
Drying up in conversation,
you'll be the one who cannot talk
All your insides fall to pieces,
you just sit there wishing you could still make love
They're the ones who'll hate you
when you think you've got the world all sussed out
They're the ones who'll spit on you,
you'll be the one screaming out
Don't leave me high, don't leave me dry
Don't leave me high, don't leave me dry
Oh, it's the best thing that you ever had,
the best thing that you ever, ever had.
It's the best thing that you ever had,
the best thing you have had has gone away.
Don't leave me high, don't leave me dry
Don't leave me high, don't leave me dry
Don't leave me high,
Don't leave me high, don't leave me dry
Who's in a bunker?
Who's in a bunker?
Women and children first
And the children first
And the children
I'll laugh until my head comes off
I'll swallow till I burst
Until I burst
Until I
Who's in a bunker?
Who's in a bunker?
I have seen too much
I haven't seen enough
You haven't seen it
I'll laugh until my head comes off
Women and children first
And children first
And children
Here I'm alllowed
Everything all of the time
Here I'm allowed
Everything all of the time
Ice age coming
Ice age coming
Let me hear both sides
Let me hear both sides
Let me hear both
Ice age coming
Ice age coming
Throw it on the fire
Throw it on the fire
Throw it on the
We're not scaremongering
This is really happening
Happening
We're not scaremongering
This is really happening
Happening
Mobiles skwrking
Mobiles chirping
Take the money run
Take the money run
Take the money
Here I'm allowed
Everything all of the time
Here I'm allowed
Everything all of the time
Here I'm allowed
Everything all of the time
Here I'm allowed
Everything all of the time
The first of the children
I do not
Understand
What it is
I've done wrong
Full of holes
Check for pulse
Blink your eyes
One for yes
Two for no
I have no idea what I am talking about
I am trapped in this body and can't get out
Ooooohhhh
You killed the sound
removed backbone
A pale imitation
With the edges
Sawn off
I have no idea what you are talking about
Your mouth moves only with someone's hand up your ass
Ooooohhhh
Has the light gone out for you?
Because the light's gone for me
It is the 21st century
It is the 21st century
It can follow you like a dog
It brought me to my knees
They got a skin and they put me in
They got a skin and they put me in
All the lines wrapped around my face
All the lines wrapped around my face
And for anyone else to see
And for anyone else to see
I'm a lie
I've seen it coming
I've seen it coming
I've seen it coming
I've seen it coming
We're not scaremongering
This is really happening
Happening
We're not scaremongering
This is really happening
Happening
Mobiles skwrking
Mobiles chirping
Take the money run
Take the money run
Take the money
Here I'm allowed
Everything all of the time
Here I'm allowed
Everything all of the time
Here I'm allowed
Everything all of the time
Here I'm allowed
Everything all of the time
The first of the children
Perhaps you can enjoy Radiohead as much as I do.
Monday, August 11, 2008
Dear NBC, I run Linux

I run linux and am very very happy with it, but there are times where I feel almost neglected because of the operating that I use. Who knows, maybe there could be some discrimination suit against them.
But seriously, can someone enlighten me as to how hard it would be for them to make it available on linux systems?
Thursday, August 7, 2008
Find Files in BASH
To search folder and subfolders for python scripts.
find . -name "*.py"Sweet now I wont forget.