Tagged: data

Hakology – How to grab openweathermap data using python.

I’ve been playing with the openweathermap api thought i’d share a little code, the following pulls the json and constructs a string containing the location, temp, tax temp, min temp and humidity. You will need to sign up for an API key and free user account 1st. The free account at the time of writing this allows 50k calls a day so if you’re writing for a small personal project 50k calls should be fine.

Copy the code below to a file
eg. displayweather.py

chmod the file if needed …
sudo chmod +x displayweather.py

run the file using …
python displayweather.py

import requests
r = requests.get('http://api.openweathermap.org/data/2.5/forecast/city?id=YOURCITYIDGOESHERE&APPID=YOURAPIKEYGOESHERE')
data = r.json()
mystring = ""
mystring = mystring + data['city']['name'] + " "
mystring = mystring + "Temp:" + str(int(data['list'][0]['main']['temp'] - 273.15)) + "C "
mystring = mystring + "Max:" + str(int(data['list'][0]['main']['temp_max'] - 273.15)) + "C "
mystring = mystring + "Min:" + str(int(data['list'][0]['main']['temp_min'] - 273.15)) + "C "
mystring = mystring + "Hum:" + str(data['list'][0]['main']['humidity']) + "% "
print mystring

Click here to download the file.

Hakology Day 9 : Blog Entry

[1124]
So it begins, late night last night, got the SDR working under windows. Todays goals, get the SDR working under linux and gqrx, look at what I managed to capture in the log and start a video showing how to setup SDR#.
[/1124]

[1215]
Really don’t want to stop logging messages lol, but I suppose its time to start making notes. Once I can get this running on the RPi ill leave it logging 24/7 for a while so I can analyse the data. Still lots of data being sent that shouldn’t be, names, phone numbers, address information, IP addresses, email addresses, URLs … and I’m sure if I log for long enough the obligatory username and password.
[/1215]

[1306]
So I can’t show or share any of the data I’m collecting. Hibby just pointed me to (Legal stuff) … even though I can’t share the data I can show you how to demodulate the signals yourself.
[/1306]

[1415]
Written up notes for SDR# installation.
[/1415]

[1513]
Executing operation tidy up for recording later also doing a few other chores.
[/1513]

[1606]
Still tidying 🙁 b/c I’m a messy bugger.
[/1606]

[1613]
Random picture for today …
Since I’m working on radio stuff here’s my baofeng handset its the uv-5r, a great starting handset for people looking to get in to HAM radio and start learning. I bought one relatively cheap on ebay around £20, before I got my licence so I could scan and listen a little. I’ve some other scanners and sets but ill save those for another day.
baofeng
[/1613]

[1713]
meh RL … need to script my house work or hack together some sort of roomba capable of washing up and making tea/coffee on demand.
[/1715]

[1824]
Chilling out time for a coffee and some food. BBL
[/1825]

[21.41]
A few pages of notes written and a rough idea for an introduction to SDR. Time for a brew and to record / talk through the audio. Will report back in a while.

Useful links:
https://en.wikipedia.org/wiki/Radio
https://en.wikipedia.org/wiki/AM_broadcasting
https://en.wikipedia.org/wiki/FM_broadcasting
https://en.wikipedia.org/wiki/Software-defined_radio
http://www.sigidwiki.com/wiki/Signal_Identification_Guide

Captured a little extra audio for the hakology introduction too.
[/2147]

[2344]
Sleep required.
[/2344]

[0448]
Woke up after a few hours sleep been doing a little radio research, too early to start the next blog entry, too late to be editing this one hmmm.
No vblog for day nine either will have to make up for it later.
[/0450]

Hakology – LinkStats – Introduction and demo (http(s) data mining)

In this video we’ll be looking at a tool I programmed about 12 months ago for mining data from web pages. Easily find file extensions and embedded objects. Let me know what you think. More soon. Peace Tea

Git hub page : https://github.com/caffeinemonster/LinkStats