The weather thread

Everything about it! Heard the news? What! is Ubuntu bankrupt? Has Mandriva started marketing? Have you taken a sky diving course?
We just need to know! No flaming! And we hate spammers -Get it?

Moderators: b1o, jkerr82508

User avatar
dedanna1029
Sound-Berserk
Posts: 8780
Joined: 14 Mar 2010, 20:29
Contact:

Re: The weather thread

Postby dedanna1029 » 02 Jul 2012, 23:25

Just wanted to let everyone know that I was displaced by the fires. I had put in notice on my place for the 1st of this month - it wasn't a good situation. The last couple weeks of June, people gave their rentals and rooms out to the many evacuees, and I couldn't find a place. So, I've taken out an SPN at school, and gone back to the shelter. The evacuees come first. I feel very bad for them. Many have literally nothing. I at least have my possessions - they don't. So, I am taking advantage of the shelter to get some money saved. If you don't see me for periods of time, please don't worry. I'm fine with this. It just means I couldn't get online.

P.S.: If you can, please run a search and donate to the American Red Cross or one of the businesses or individuals, shelters, or organizations that are helping the evacuees. Thanks.
I'd rather be a free person who fears terrorists, than be a "safe" person who fears the government.
No gods, no masters.
"A druid is by nature anarchistic, that is, submits to no one."
http://uk.druidcollege.org/faqs.html

User avatar
viking60
Über-Berserk
Posts: 9351
Joined: 14 Mar 2010, 16:34

Re: The weather thread

Postby viking60 » 31 Oct 2012, 12:09

Well It is cold and I am tired of shoveling snow. I have removed several tons already. I Just noticed in the news that Scientists now have discovered that Carbon does not have that negative effect on the atmosphere as they have claimed so far.
So this will give us more time to cut our carbon footprints. As always; the scientists are dead sure this time too.....(as they were about the earth being flat back in the day).

So we should still work on reducing our carbon footprint (stop farting and reduce breathing. Joggers are polluting machines :T ) This is important because.... eh because... I am not sure anymore - but chicks dig it +1


.....
So after having given it some thought I have identified a cunning plan from our government. As always they want your money (preferably all of them), to finance their always sensible activities - and to pay for their "jobs".

So here is step one:
Everybody is driving petrol cars - this is bad for the environment so we will put heavy taxes on petrol. Diesel cars are much better!

So I and all others felt guilty and invested in a Diesel driven car - at some point so many people got so environmental that the Government was actually loosing money So what to do?
Enter step two:

Diesel driven cars are poluting heavily locally and it is questinable if the carbon footprint is so heavily affecting the atmosphere so we will heavily tax Diesel too! Electrical cars are the only ones that will do.

This statment is already a lie in many countries -but not in Norway- because we produce our electricity with regenreative sources like water. Put the waterfall in pipes and make it charge the turbins and this will have a minimal effect on the environment.

Most countries do not do that - they use Coal, Oil, and Nuclear power.

So since the energy needed to move your car is pretty much the same, you could actually be driveing a coal driven car.

But as the observant reader will have noticed - this does not matter much in this context.

If the electric car sales takes of in a maner that the government looses income, then the above argument will be presented, and being dynamic politicians they will of course act upon it...... so they will put tax on electric driven cars.....

And here I thought that the government had the moral highground and only wanted to save the world.
What they want is your money! And presented by the choise of money and a better environment - they would pick the money - every time.

The worst part is that all the money generated by these taxes are rarely spent on improving the environment - well buerocrats have to live too I guess.

So here I am shoveling snow - and guess what, that is still tax free.
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

User avatar
dedanna1029
Sound-Berserk
Posts: 8780
Joined: 14 Mar 2010, 20:29
Contact:

Re: The weather thread

Postby dedanna1029 » 01 Nov 2012, 09:07

Ignore the carats:

Code: Select all

dedanna@dedanna ~ $ ./weather.bash <myzipcode>
Weather: Observed at <a location within my city>, <my city>, Colorado
Updated: 1:53 AM MDT on November 01, 2012
Temperature: 33.5°F / 0.8°C
Windchill: 34°F / 1°C
Wind: SSW at 0.0 mph / 0.0 km/h
Conditions: Clear
Humidity: 53%
Dew Point: 18°F / -8°C
Pressure: 30.24 in / 1024 hPa (Falling)


weather.bash is a sort of combo code, written by Dave Crouse initially, then others made updates and modifications, then I had to make modifications to it still, so it would work for me; however, I take no credit because I only had to modify approximately the last half of it, and I did it to make it work for me, the way I wanted it to. You need to have elinks (IIRC, that's what it was? It was forever ago, some three-four years ago maybe, but at any rate it will tell you when you try to run it) installed for it, btw. It's nice to have; all you need do is pull up a terminal, and type in ./weather.bash <your zip code> (without the carats). You could also name it weather.bin if you'd like instead.

If you'd like, here is the code:

Code: Select all

#!/bin/bash
# weather.bash
#desc Find current weather stats for your zip code
#desc Ex: ${trig}weather 03301
# weather 1.1 -Crouse
# With Updates by Jeo
# Modified to run stand alone by Brian Masinick
# Example: !weather 03301
# Usage: weather + zipcode

zipcode=$1
if [ -z "$zipcode" ]; then
echo "Please provide a zip code (Ex: weather 03301)"
else
unset response
# Add a backslash (\) after -dump-width 300 if this line splits
# across two lines; Should be one distinct line:
WEATHER="$(elinks -dump -dump-width 300 "http://mobile.wunderground.com/cgi-bin/findweather/getForecast?query=${zipcode}" | grep -A16 Updated)"

if [ -z "$WEATHER" ]; then
response="No Results for $zipcode"
echo "${response}"
else
response[1]="$(echo "$WEATHER" | grep -Eo 'Observed.*' | sed s/\ *\|\ */\|/g | awk -F\| '{print "Weather: " $1}')"
response[2]="$(echo "$WEATHER" | grep -Eo 'Updated.*' |sed s/\ *\|\ */\|/g |awk -F\| '{print $1}')"
response[3]="$(echo "$WEATHER" | grep -Eo 'Temperature.*' | sed s/\ *\|\ */\|/g | awk -F\| '{print $1 ": " $2}' | sed s/DEG/\ /g )"
response[4]="$(echo "$WEATHER" | grep -Eo 'Windchill.*' | sed s/\ *\|\ */\|/g | awk -F\| '{print $1 ": " $2}'| sed s/DEG/\ /g)"
response[5]="$(echo "$WEATHER" | grep -Eo 'Wind .*' | sed s/\ *\|\ */\|/g | awk -F\| '{print $1 ": " $2}')"
response[6]="$(echo "$WEATHER" | grep -Eo 'Conditions.*' | sed s/\ *\|\ */\|/g | awk -F\| '{print $1 ": " $2}')"
response[7]="$(echo "$WEATHER" | grep -Eo 'Humidity.*' |sed s/\ *\|\ */\|/g | awk -F\| '{print $1 ": " $2}')"
response[8]="$(echo "$WEATHER" | grep -Eo 'Dew.Point.*' |sed s/\ *\|\ */\|/g | awk -F\| '{print $1 ": " $2}'| sed s/DEG/\ /g)"
response[9]="$(echo "$WEATHER" | grep -Eo 'Pressure.*' |sed s/\ *\|\ */\|/g | awk -F\| '{print $1 ": " $2}')"

for index in `seq 1 9`; do
if [ -n "${response[$index]}" ]; then
echo "${response[$index]}"
fi
let "index = $index + 1"
done
fi
fi


Even if I've already posted this code somewhere here, it's OK, I think, to pull it back up to the present every now and again. It's just that handy.
I'd rather be a free person who fears terrorists, than be a "safe" person who fears the government.
No gods, no masters.
"A druid is by nature anarchistic, that is, submits to no one."
http://uk.druidcollege.org/faqs.html

User avatar
rolf
Guru-Berserk
Posts: 1107
Joined: 16 Mar 2010, 16:07

Re: The weather thread

Postby rolf » 01 Nov 2012, 13:17

That's very clever. +1 and, yes, it's elinks that it uses.

Code: Select all

[rolf@localhost weather]$ sh ./weather.bash 94602
Weather: Observed at APRSWXNET Oakland CA US, Oakland, California
Updated: 4:47 AM PDT on November 01, 2012
Temperature: 57 F / 13.9 C
Wind: SW at 0 mph / 0.0 km/h
Conditions: Rain
Humidity: 93%
Dew Point: 55 F / 13 C
Pressure: 30.00 in / 1016 hPa (Falling)

[rolf@localhost weather]$ sh ./weather.bash 94087
Weather: Observed at Panama Park, SUNNYVALE, California
Updated: 5:14 AM PDT on November 01, 2012
Temperature: 57.7 F / 14.3 C
Wind: NNW at 0.6 mph / 1.0 km/h
Conditions: Light Rain
Humidity: 97%
Dew Point: 57 F / 14 C
Pressure: 30.01 in / 1016 hPa (Steady)


User avatar
dedanna1029
Sound-Berserk
Posts: 8780
Joined: 14 Mar 2010, 20:29
Contact:

Re: The weather thread

Postby dedanna1029 » 01 Nov 2012, 21:05

Nice.
I'd rather be a free person who fears terrorists, than be a "safe" person who fears the government.
No gods, no masters.
"A druid is by nature anarchistic, that is, submits to no one."
http://uk.druidcollege.org/faqs.html

User avatar
dedanna1029
Sound-Berserk
Posts: 8780
Joined: 14 Mar 2010, 20:29
Contact:

Re: The weather thread

Postby dedanna1029 » 25 Jan 2013, 13:10

What it's not saying, is it's been snowing all morning, rain expected later on. I'm debating on adding it to the script, but would have to freshen up on code a bit - it's been forever.

Code: Select all

.:[ dedanna@dedanna.rockz.net : 12:06:33 : ~ ]:.
:) ./weather.bash 'g67 2du'
Weather: Observed at Abronhill, Cumbernauld, United Kingdom
Updated: 12:08 PM GMT on January 25, 2013
Temperature: 35.1°F / 1.7°C
Windchill: 31°F / 0°C
Wind: SW at 4.3 mph / 6.9 km/h
Wind Gust: 8.3 mph / 13.4 km/h
Humidity: 78%
Dew Point: 29°F / -2°C
Pressure: 29.71 in / 1006 hPa (Falling)
I'd rather be a free person who fears terrorists, than be a "safe" person who fears the government.
No gods, no masters.
"A druid is by nature anarchistic, that is, submits to no one."
http://uk.druidcollege.org/faqs.html


Return to “The Lounge”