Tuesday, October 22, 2013

Cold Feet

I created the Not So Mobile Temperature logger using the Arduino. Not so mobile because my 9V battery packs did not work. 


I used it to track the temperature under my desk at work. My feet are constantly cold at work in the fall/winter months. This day was a chilly day but not terribly cold.


Log Start Time: 7:36AM
Log End Time: 4:30PM

Average Temperature: 63.71
Mode: 64.17
StdDev: .085
Max: 65.93
Min: 60.65

Here is a graph using a subset of the data set.




Here is a shot of the Not So Mobile Temperature Logger.


Monday, September 16, 2013

Tootsee Roll Likability Progression

Remember that awesome song Tootsee Roll by the 69 Boyz circa 1994. Well you may remember the song but not the awesomeness of it. That song has an amazing intro, and then proceeds to get terrible at about the 84.35 second mark. The song craters at this point in such a manner you are asking yourself what just happened.

Here is a non-scientific chart showing the likability progression of the song.


Click Image for larger version.

Wednesday, September 11, 2013

Multiple ALTER Trigger Statements SQL Server

I was trying to update multiple triggers in a single job step. The solution took me a while to come up with so I thought I would throw it in here. When running mulitple dynamic ALTER TRIGGER statements you quickly discover that you lose context. By using the sp_executesql stored procedure and specifying the database name you can preserv context during each execution.



Friday, August 30, 2013

Draft this Weekend

So my Fantasy Football draft is this weekend. I have taken part in a few mock drafts and keep coming up with the same issue. After the first couple of rounds you are siting there staring at the screen wondering what player to take.


Fortunately there is not a lack of analisys. Seems like everyone has an opinion, a ranking, a projected stat calculation, etc. However flipping from site to site becomes pretty tedious.


I am in a hurry now to throw together a tool I call draft view. I am scraping the web sites for analysis and throwing them into a database. From there I can type in a player or a list of players and get all the information on a single screen.


I am not predicting a victory for my team, but at least I will not be scurrying around as much during the draft trying to figure out if I should take Hillman or Joique Bell.



Early Screen shot of the app:


image


Update 8/30 @ 3:55PM


Sources of info


  • ESPN Average Draft Position Chart

  • Cheat Sheet from this one site (wink)

  • ESPN FF Projected Rankings

  • ESPN Point Projections

  • Point Projections from this one site (wink)

Wednesday, August 28, 2013

First FitBit Numbers

So I have been wearing the FitBit for over a year now. I thought I would start looking at the numbers. I haven’t made time to really look at the numbers but I did come up with the Top 10 Step Count days and the Top 11 best days of sleep. I used 11 because I found out that one day I forgot to stop the counter when I woke up. FitBit thought I slept for 12 hours that day…yeah right!



Thursday, August 8, 2013

PowherShell Mass download with Credential

I needed a PowerShell script to download several images from my web server. The images were in a password protected area of my web site. At first I was receiving 401 errors due to lack of authentication. So I just had to add the Get-Credential module under the System.Net.WebClient. This prompted me for a password and boom the download worked as planned.


The $i is used to denote the number in the loop. As you can see my pictures had an interesting naming format since I just exported these out of picasa as JPG. The pics were originally shot as RAW files from my Nikon


$storageDir = "C:dl"
$webclient = New-Object System.Net.WebClient
$webclient.Credentials =Get-Credential
$i = 6900
do {
$url = "http://your your.com/dsc_$i.nef.jpg"
$file = "$storageDir$i.jpg"
$webclient.DownloadFile($url,$file)
$i++
}
while ($i -le 7548)

Monday, July 29, 2013

Cardinals vs Braves since 1990

Few of my friends like to trash talk Cardinals vs Braves. Here is how the teams compare since 1990. I chose 1990 because that is around the time I started to care about MLB and its my blog, not yours.


I did run some numbers for the entire history of the two teams. Cardinals own the overall games won total by an impressive 411 games. However remember that at one point in the history of the Braves, they were called the Boston Beaneaters. Not sure how you expect to field a good team with a name like that. Cardinals also lead the overall head to head record 1060-957 (.526).


However since 1990:


  • Braves lead in overall wins by 154 games

  • Cardinals have been in the playoffs 10 times

  • Braves have been in the playoffs 16 times

  • Cardinals have been to 3 World Series and have a record of 2-1

  • Braves have been to 5 world Series and have a record of 1-4

  • Braves lead the head-to-head record 115-85

Click Image for a larger version.


image


So one could easily say in recent history that Braves have been better than the Cardinals. Remember though you can make the numbers say exactly what you want (and I do not like the Cardinals).


I can almost hear the Cardinal tears being cried how this is not fair, or claiming how high their attendance numbers have been, or total World Series counts or something.


The Cardinals have had a long storied history of excellence and the Braves have had an extended run of excellence over the past two decades. Hey as a Royals fan, I really have nothing to say. We had some glory years in the 80s. Fans of the Cardinals and Braves have it good. 


I guess as a Royals fan we do have one thing to say: “Safe” -Don Denkinger Game 6 10/26/1985.



Wednesday, July 10, 2013

Friday, June 14, 2013

PowerShell Mass Download

Here is an example of a PowerShell script to mass download files from a web site. This is a very simple example and would probably need to be changed based on your need. The files I wanted to grab were named 1000.jpg.  A four digit number jpg.


$storageDir = "C:somefolder"
$webclient = New-Object System.Net.WebClient
$i = 1050
do {
$url = "https://yourwebsite.com/path_to_the_files/$i.jpg"
$file = "$storageDir$i.jpg"
$webclient.DownloadFile($url,$file)
$i++

while ($i -le 2000)

Good luck