Warning: strpos(): needle is not a string or an integer in /home/allisona/public_html/kcocco/index.php on line 31

Warning: strpos(): needle is not a string or an integer in /home/allisona/public_html/kcocco/index.php on line 37

Warning: strpos(): needle is not a string or an integer in /home/allisona/public_html/kcocco/index.php on line 49
KCOCCO ~ photo - Silver Fork Tour
Silver Fork Tour 

Silverfork cirque
Panoramic with PhotoStitch

From top of Honeycomb Canyon with Magali
Panoramic with Panoramic Factory
  |  [ 0 trackbacks ]   |  permalink  |  related link
International Travel Clinic 
Hats off to the Salt Lake Valley Health Department's International Travel Clinic! Our R.N. Holly poked us with 3 shots (Hepatitis A/B, Tetanus, polio) and 1 oral (Typhoid, 4 pill take home). Holly also prescribed the following drugs: 2 Malaria(Aralen Choloroquine Phosphate, Doxycycline), Zithromax for traveler's diarrhea, Diamox for altitude, Zolpidem sleeping pills for jetlag. She gave us detailed medical information for all of my upcoming countries: Belize, Thailand, Bhutan, India. Also general tips on water treatment, food standards, bugs, sanitation. I did not know water that has been carbonated for 24 hours kills bacteria? I learned about some new bug repellent products like Fite Bite that you apply to your clothing and can be wash twice and still be active. Holly sent us home with a thick packet of info including a catalog from travmed.com . I placed an order tonight for power converter, Ultrathon and Fite Bite bug repellents, Iodine tablets, kwikpoint picture card.
Excellent service thanks Holly!

  |  [ 0 trackbacks ]   |  permalink  |  related link
Wasatch 200 inch+ 

Snowbird epic day!
  |  [ 0 trackbacks ]   |  permalink  |  related link
Deep snow welcome home 

Powder horn laps, Mike powing out of the trees.

Mike, Wheelie time


Pictures didn't catch this excellent drop that Mike gets....huge!



I'm back in Utah! And it is dumping. Little Cottonwood Canyon did not even open today due to Avalanche control work. The resorts Alta and Snowbird are interlodged tonight.....they hope to have the canyon open tomorrow morning. There should be well over 3 feet of untouched new powder waiting for me tomorrow!!! I am expecting Alta to post a base of 200+ inch!!!

Finished reading the guidebook Bhutan Lonely Planet . I am prepared for the yaks, chiles, mountains, customs...adventure. My first of the Lonely planet series and not my last...I am deep into LP Inida.
  |  [ 0 trackbacks ]   |  permalink  |  related link
Perl Stripping 
Over the holiday Dad and I hacked a perl script that parses HTML pages from FoodNetwork.com. The goal was to get the episode numbers & names for Molto Mario recipes. Our first step was to save the index page of Mario recipes from FoodNetwork.com . We then used the Unix command wget to search the page for URL links and save the associated HTML pages into one directory. We then created a Perl script that opens each of the HTML files found in the directory and pulls out the data we needed.
Here is an example of the output(episode number, name, recipe name) now ready to load into a database:
MB2G15~Trastevere On a Sunday~Gnudi con Fiori di Zucca
MB2G15~Trastevere On a Sunday~Chicken with Sweet Peppers: Pollo con Peperoni
MB2G17~Antica Bessetta~Bigoli - Basic Recipe
MB2G17~Antica Bessetta~Bigoli Bianchi with Duck Ragu
MB2G17~Antica Bessetta~Bigoli Scuri

Here is the general script that can easily be altered to parse other shows:
#!/usr/bin/perl
####################################################################
# recipestrip.pl
# Text stripping script. Used on Foodnetwork html pages.
# 3.28.2005 K & L Cocco
#
# Program used to capture episode number & title and recipe tiles
# from html files.
# The raw html files were gathered from foodnetwork.com with wget command
# using flags -i and -F.
# example: wget -F -i capturedhtmlfile.html
#
####################################################################
use Getopt::Long;
use File::Basename;

sub trimwhitespace($)
{
my $string = shift;
$string =~ s/^s+//;
$string =~ s/s+$//;
return $string;
}

$path="/video1/mario/shows/";

opendir(SHOWS, "$path");
@Allnames = readdir(SHOWS);

open (koutputfile, ">episoderecipelist.txt") :: die ("Could not open file. $!");
foreach $Name (@Allnames) {
if (-d $Name) {next};
($show, $path, $suffix) = fileparse($Name, ".html");
if ($suffix ne ".html") {next};
#print $Name,"n";

open (inputfile, $Name) :: die ("Could not open file. <br> $!");

foreach $text (<inputfile>){
# chomp $text;
#print $text;
if ($text =~ /articleshowname/){
$stopsl = index($text,"Episode ")+8;
$lensl = index($text,"</SPAN><P") - $stopsl;
$episodenum = substr($text,$stopsl,$lensl);
#print substr($text,$stopsl,$lensl),"n";
print $episodenum,"n";
# print $text,"n";
#print "stopsl: ",$stopsl, " lensl: ",$lensl,"n";
#print "*****************************************n";
}
if ($text =~ /episodename/){
$stopsl = index($text,"name'>")+6;
$lensl = index($text,"</SPAN") - $stopsl;
$episodename = substr($text,$stopsl,$lensl);
#print substr($text,$stopsl,$lensl),"n";
#print $episodename,"n";
# print $text,"n";
#print "stopsl: ",$stopsl, " lensl: ",$lensl,"n";
#print "******************************************n";
}
if ($text =~ /recipes/recipe/){
$startsl = index($text,"html'>")+6;
$stopsl = index($text, "</a></TD>");
# captures lines with no ending tag
if ($stopsl == -1) {
$stopsl = length($text);
}
$lensl = $stopsl - $startsl;
print koutputfile trimwhitespace($episodenum)."~".trimwhitespace($episodename)."~".trimwhitespace(substr($text,$startsl,$lensl)),"n";
#print $Name,"n";
#print "stopsl: ",$stopsl, " lensl: ",$lensl,"n";
#print "******************************************";
}
}
close (inputfile);
}
print "*** Run completion ***n";
close (koutputfile);
  |  [ 0 trackbacks ]   |  permalink  |  related link

Back Next

// Google Analytics