Showing posts with label fun. Show all posts
Showing posts with label fun. Show all posts

Monday, June 20, 2016

MLB.com Fantasy Baseball Score Checker

I've been hacking away on a project for my fantasy baseball league. MLB.com's fantasy baseball has its daily scoreboard in flash, so it doesn't work on mobile.

Not only did I want to check my score on mobile, I thought having easily accessible scores on mobile would make things more engaging for the whole league!

I wrote a python script to scrape values from MLB servers and display them in a simple interface:

This league has classy team names. 
The basic flow of the script is:
  1. Get the fantasy league schedule JSON data from this URL:
    http://www.mlb.com/fantasylookup/json/named.fb_index_schedule.bam?league_id=1514
    Note the league_id can be found with CTRL-F if you "view source" on your league homepage.
  2. Process the fantasy league schedule and build a big Python dictionary called this_week (I should have built a class - maybe that's on the todo list). This step figures out all of the fantasy team_id's that belong to your league_id.
    Also, build each team's roster based on the fantasy team roster data. The period_id comes from the schedule data, and the player_ids come from here:
    http://www.mlb.com/fantasylookup/json/named.fb_team_lineup.bam?&team_id=9972&period_id=13
  3. Figure out which games are being currently played in real life. This can be done by counting the number of folders containing matching regex gid_[0-9]{4}_[0-9]{2}_[0-9]{2}[a-z0-9_]* from this directory:
    http://gdx.mlb.com/components/game/mlb/year_2016/month_04/day_25/ (substitute today's date)
    Specifically, we are looking for the boxscore.json files for each game:
    http://gdx.mlb.com/components/game/mlb/year_2016/month_04/day_25/gid_2016_04_25_chamlb_tormlb_1/boxscore.json
    We are going to use these to calculate the fantasy points for each player's real-life stats.
  4. Grab every boxscore.json file for today's real-life games, read the data and build a monster dictionary called super_boxscore.
  5. Loop through all of the fantasy player rosters in the this_week variable,  and look up the player_ids in the super_boxscore variable. Calculate fantasy points for each player_id.
  6. Show the results!
I wrote most of this blog post a month ago, intending to add more features and make a richer blog post. Sadly, like many of my projects it has stalled at nowhere near completion and I have not put in any time over the last 4-5 weeks! 

But if you are running an MLB.com fantasy league and you want a better mobile interface for your members, check out my project on Github: https://github.com/b-neufeld/mlb-fantasy-checker 

Sunday, February 28, 2016

Great British Bake Off

Robyn got me hooked on this show called the Great British Bake Off. It has inspired me to try baking a couple of the tastier looking things on the show.

Here is Mary Berry's Lemon Tart:

Not bad for a first crack!

Here is a fruit tart that uses the same sweet crust recipe as the lemon tart, with a crème pâtissière (from this recipe) filling. The crust turned out nicer looking this time:

The recipes are brilliant because they're in grams; you can't possibly muck up the measurements.

I made one slip up on the fruit tart. I used Masa Harina for "corn flour", but I should have used corn starch (only the US and Canada refer to "corn starch", the rest of the world calls it corn flour"). It still tastes fine, but the texture is a little bit off. The other UK-ism is that caster sugar is sold as berry sugar in Canada.

Monday, December 24, 2012

Why do you clean your old NES games?

I bought Mike Tyson's Punchout for NES from High Teck Game Traders in Saskatoon - a buddy got me a gift certificate for Christmas.

This is why your old NES games don't work:

Before: 

After:

If you own NES games, go buy yourself some of this: 



Monday, December 17, 2012

Restored my NES!

A partial update to this post; a few days ago I finished completely restoring my Nintendo Entertainment System and all of the games for it. I followed this most-excellent guide for the basic steps.

In summary, I:
- Replaced the 72-pin connector inside the NES console;
- Dusted the inside of the console;
- Mr. Clean Magic Eraser'd the console and the outside of all the games;
- Polished all of the game connectors with Mother's Mag and Aluminum Polish;
- Replaced the CR2032 batteries in my two Zelda games (I & II).

After replacing my 72-pin connector, games loaded instantly about 50% of the time. After polishing all of the game connectors, games loaded instantly almost 100% of the time. I still almost can't believe it; it's like playing on a brand-new system.

Can't recommend the Mother's Mag and Aluminum Polish highly enough. I got a mirror finish in the copper on most of the game connectors:


Beauty. If anyone wants to come over and play RBI Baseball, Super Mario 3 or Ice Hockey, drop me a line :)

Monday, November 26, 2012

The Biggest (Gaming) Mistake

After the Nintendo Gamecube was released, I packed up our N64 and all of our games and traded it all towards that stupid purple cube. So many classics gone: Goldeneye, Smash Brothers, Perfect Dark, Mario Party (and sequels), and a rare copy of Bust-a-Move. And Mario Kart 64! Holy crap, me and my siblings played a lot of Mario Kart. Could you hop over the wall in Wario's Stadium? I could.

We had an Xbox already, so I didn't see any reason to keep the N64 even though it was the first console we ever owned. Oh, young Brahm didn't know anything about nostalgia then.

Some years later I took that Gamecube into High Tek Game Traders and swapped it for another N64. Ahhh. That's better. I never bought all of the games back, but I nabbed the important ones. I won't make that mistake again.

--

Robyn recently got the urge to play Super Mario Bros on my NES. I didn't have an NES as a kid but my Uncle Bill and Aunt Erna had one. We'd go over to their farm and run to their bedroom, where it was set up on a little 13" TV. We loved it. In high school, I bought an NES, 2 controllers, the Zapper and about 8 games off my friend Curtis for an absurdly reasonable price (given their current resale prices) - can't quite remember what it was. A couple years later he asked to buy it back. Sorry dude, all sales final.

When Robyn and I unpacked the NES, the Mario Bros/Duck Hunt cartridge was missing! And I know for sure that I owned it, because I have the Duck Hunt gun. We played Bubble Bobble instead.

Oh well. Robyn ordered Mario Bros on eBay. I also ordered River City Ransom and Duck Hunt, and I'm bidding on RBI Baseball. Woo!

I've got a new 72-pin connector in the mail so I can fix the finicky loading on the NES, and a gamebit so I can pop open the cartridges to clean the connectors. I'm going to take care of my sweet little NES and protect it... this is how I'll honour my fallen N64 and Bust-a-Move. Never Forget.

Monday, November 5, 2012

Cast Iron Cornbread

Yummmmmmmmmm:


Crunchy, buttery outside, sweet tasty inside!

My favourite new toy is the cast iron pan that Robyn and I got for our wedding. I made this recipe from foodnetwork.com after work today, and YUM, I will be making it again.

Cast iron pans = AWESOME.

Thursday, September 20, 2012

America the Beautiful


I'm totally smitten with US National Parks. On our last two vacations, Robyn and I have explored:

- Bryce Canyon National Park, UT
- Zion Canyon National Park, UT
- Grand Canyon National Park, AZ
- Glacier National Park, MT
- Yellowstone National Park, WY

Glacier National Park

There's so many incredible scenes, geological features, and wildlife in the national parks it's stunning; you feel transported through time.

Old Faithful.

I'm halfway through a documentary series called National Parks: America's Best Idea, produced by Ken Burns. He dives into the history and modern-day challenges the parks face over 6- 2-hour episodes.

The Grand Canyon of Yellowstone

The history is incredible enough. In the late 1800s, industry was driving America's development, and it was moving at a whirlwind pace. Forests were being cleared for timber and grain fields, valleys were being dammed for drinking water and power, and known national wonders (like Niagara Falls) were bastardized and turned into horrible tourist traps. It was the foresight of a few dedicated conservationalists who pioneered the idea that some places are so beautiful that they must be preserved for future generations, at all costs.

Mud bubble caught mid-burst at Yellowstone

It was hard at first. After the US Congress established the first national park (Yellowstone), they didn't set aside any funds for it - the logic was that trees didn't need money to grow. Growing numbers of visitors were taking their toll on the parks, and three different brances of the army claimed some responsibility for "guarding" the parks. But as an increasing number of visitors was taking their toll on a growing number of parks, the National Park Service was created to protect and manage those resources.

Close-up of bacteria mat in a sulfur pool in Yellowstone

Knowing the history makes you appreciate the parks so much more. For instance, without a National Park designation, Yellowstone and others would have devolved into an ugly, casino-filled tourist trap much like Niagara Falls is today. Without the efforts of an EXTREMELY small number of dedicated humans, we simply wouldn't have publicly-accessibly nature spaces to enjoy! The land would be lost to development or gobbled up by wealthy individuals.

y helo thar! Bison at Yellowstone.

I hope I get to see many more parks, both American and Canadian. They're just special places that I feel like I need to experience.

Tuesday, September 18, 2012

Married!


Robyn and I got married a month ago: August 18, 2012 at the Berry Barn outside of Saskatoon.

The wedding couldn't have been more perfect. Everything and everyone looked amazing, most of all Robyn.


I started the day by taking my groomsmen out for breakfast at Jerry's Food Emporium. From there, we went to my parents' house where we changed into our tuxedos. Kudos to Devin for figuring out how to fold the silk pocket thingy.

We met up with the girls downtown - they all looked incredible - and started on our wedding photos. We took some shots by the river downtown, by the synchrotron, then a few more out by the Berry Barn before the ceremony. I drove alone to the Berry Barn, pumping myself up with some heavy metal.

Our officiant was the pastor from Robyn's family's United Church in Humboldt. She did an incredible job putting together the right ceremony for us: secular-leaning (with a couple multi-denominational prayers), and lots of beautiful language about love and commitment and our relationship. Robyn's dad (keyboards and vocals) and sister (vocals) were going to perform "The Rainbow Connection" during the registry signing, but it was so good at the rehersal that we said "play it, we'll sign the documents after the song is done". We hired a string quintet that learned Abba's "I Do, I Do, I Do" for the recessional. All the music was incredible!

The turnout was incredible, too - we invited about 120 people, and almost everyone made it (we'd read that we should expect 20% absenteeism). Almost every person from our four families was in attendance, plus many close friends. It was so great to see everyone there.

Cocktails were served right after the ceremony, then dinner, then speeches and toasts. Our friends and family really worked hard on their speeches - they were all funny, moving, well-prepared, heart-felt and emotional. A LOT of people commented on how good they were. And even though they lasted a while, no one seemed to mind.

At sundown, a bonfire was started in a fire pit. Those who didn't leave to escape the mosquitoes gathered to chat with each other. The night ended relatively early (10:30pm), which was okay with me and Robyn because we were exhausted.

We should be receiving our wedding photos soon! I'll share a few on the blog. It was such a fun and meaningful day; hard to summarize in blog form. Thanks to all of our friends and family for their love and support.

Saturday, August 4, 2012

The Best Mugs

Robyn's sister Allyson made us these awesome mugs for Robyn's wedding shower a few weeks back. I love them the most!!

Wednesday, August 1, 2012

Cheesy As Can Be

Here's a video from the archives of me and my best pal Matt singing the "Ultimately As Cheesy As Can Be Song" at our Grade 12 Showcase (talent show thingy) in 2004. It was fun!


Saturday, May 26, 2012

Geeky-Fun Wedding Invites & Website

Robyn and I finally got our wedding invites out the door a couple weeks ago. I wanted to design the invites  do something that reflects our personalities - fun, geeky, simple. But not TOO geeky.

That meant no flowers, no cursive text, no spelling out "two thousand and twelve at four o'clock in the afternoon". It also meant no Battlestar Galactica references even if we are both fans.

In the end I used a few pixelated Microsoft Paint "jellybean" doodles of us - I've these little jellybeans for a few years now. I used a ton of whitespace and some simple fonts, and simple text on the inside. (thanks Scott Borys for the font help and other feedback!)



QR code on the back! There is a heart inside. For LOVE.

We also put together a really simple, clean site in Google Sites: www.robynandbrahm.ca

With the website we wanted to do two things: 1) eliminate the need for invite inserts about registries, directions, hotels, etc and 2) match the aesthetic of the invite so that everything feels like part of one package. I think we did a pretty good job!

Oh, we also did a good job not spending too much money on this stuff.

Total costs:
Domain name (robynandbrahm.ca): $14/year
Adobe InDesign (free 30-day trial to do invite layout): $0
Invitations: $94 (I sent Saskatoon Fastprint a pdf and they printed 100 invites, cut and folded them).
Picture magnets (not pictured): $70

Total cost for invites and website: $178. Not bad!

I hope Robyn posts a picture of our guestbook from Shutterfly. It's really awesome.

Friday, May 11, 2012

Soccer ID Win

Two ID cards running!

Awww yeah.

(Do I look like a creeper in the second one?)

Saturday, March 17, 2012

Butterflies

I met up with some family in Montreal today and visited the greenhouses at Montreal's Botanical Gardens! I took a bunch of pictures, here are some of my favourite ones. Click on them to see bigger versions.







Close-up of the above plant:

75 year old bonsai tree! 




The one on the right had silver leaves! 

Monster pinecone? 


Tuesday, December 27, 2011

Christmas Cookies 2011!

My family has a tradition of excellence in intensely decorating Christmas cookies every year. Click on the pictures to make them bigger and see what you can spot!

The Monopoly board is mine! Robyn made the dude playing in the ball pit.



Here's the aftermath of the table:






Wednesday, December 14, 2011

Amazing Soccer Jerseys

My pal Matt gave me an early Christmas present - a team jersey for Wrath of the Norsemen FC, a soccer team in Saskatoon that I'll be joining once I move back here.

The jersey's AMAZING logo was done by his lovely girlfriend Krystal and I LOVE IT!!!!


And the back even has my name and number (101, or "LOL")!

The teddy bear on the logo is definitely a tribute to our first co-ed soccer team, the Super Best Friends Football Club (designed by me!)

Looking forward to getting back in the game!

Saturday, December 3, 2011

Ice Cube Spike

I found this in my freezer today:

An ice spike!!! How does this happen? According to the Nonlinear Physics Group at the University of Toronto:
[A]s the ice freezes fast under supercooled conditions, the surface can get covered except for a small hole. Water expands when it freezes. As freezing continues, the expanding ice under the surface forces the remaining water up through the hole and it freezes around the edge forming a hollow spike. Eventually, the whole thing freezes and the spike is left.
Neat! Hooray for science!

Saturday, November 19, 2011

Yellow Dots Blog visits the frontpage of Reddit

Wow - someone submitted a link to my Yellow Dots blog to reddit (a massively popular link-sharing site) yeterday. I was quoted in PC World magazine about the tracking dots issue back in June and I thought that would be big exposure, but I was wrong.

Here's a snapshot of my all-time Yellow Dots blog traffic:
That tiny little blip near July is PC World magazine traffic. That massive spike in November? Reddit. You can see that I have had 181,000 pageviews in the last month, but (do the math) I only had 6,000 pageviews before this reddit exposure.

Here's the weekly traffic:

It was pretty cool suddenly getting that level of exposure. All that traffic generated about 15 or 20 new blog comments of all varieties, which I spent some time responding to. But it only lasted about six hours - suddenly, it was all over, and the internet's attention was focused elsewhere! (As depicted by the sharp drop-off in traffic).

When I started the Yellow Dots blog, I wasn't aiming for immediate exposure - I wanted to document my experiences online for other people to find. It looks like that's exactly what happened! In fact, I sent a message to the person who submitted a link to reddit and asked where they found the link. Their answer - Google! It made my very happy :-)

Thursday, November 10, 2011

Remember, Remember, the 'Stache of Movember

I grew a sweet* beard during the project commissioning I was doing in Saskatoon from late September to early November.

* I said it was sweet, Robyn pretended not to like it but secretly thought it was sweet

At this point I wanted to add Community-esque Starburns but within seconds of starting I gave up.

Bye, huge burns.

Attempting the handlebar... nope, not enough hair at the sides of my mouth.

The final greasy result! For now. Perhaps there will be another update in two weeks, before the month's end.

Over half the guys in the Montreal office seem to be growing moustaches this month - some amazing, some rank nasty - but that's all part of the fun! 

If you'd like to donate to Prostate Cancer Canada through my Movember page, you can do it here! Prostate Cancer Canada is a registered charity that sends 86% of the funds they raise to research programs - a much higher research:administration ratio than some other charities! (source)

Bonus: Here's me last year, if you didn't see it.