f-log

just another web log

24 Sep 2014:
cygwin conspires to keep windows vista at bay
I was using cygwin to create a folder and then use wget and curl to download VM image files from https://www.modern.ie/en-gb/virtualization-tools

The self extracting archives would not open instead giving

"Windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item."

I tried a number of things before copying one of the files to a new folder via Windows Explorer and low and behold it worked! So I quickly moved all the other files into the new folder and ... then are gave the same error.

Now remember that these are each multi gigabyte files, I had to copy them one at a time, deleting the original to make space so I could copy the next. It did fix my problem, no idea what permissions cygwin or/and wget/curl had given the files. No, it was not the classic "Unblock" from the internet setting.
24 Sep 2014:
timsort ballet
I am not smart enough to understand Timsort but I do like the music it plays :p

24 Sep 2014:
Pycon UK 2014 kids robots quadcopters minecraft and raspberry pis
I have been searching for Raspberry Jams in the local area and turning up empty. Either they are too far to travel or/and they are sold out in minutes. So when the Raspberry Pi Foundation blog posted about the up coming PyCon with a special kids day I jumped at the opportunity.

The posting only revealed the kids day if you read past the Teachers bits and there seemed to be about 75 kids tickets available.

Not sure what to expect my 6 and 7 year old boys turned up the the TechnoCentre in Coventry University Technology Park with tickets in hand. Then we got blown away...

The boys both got a swag bag and t-shirt. In the swag bag was, personalised mug, Raspberry Pi book, sweets, key-ring, water bottle, lanyard and oh just a Raspberry Pi B+

Jammy kids !!

The whole day was a blast, from dancing robots to back flipping quad copters with cameras to Minecraft programming and show-and-tell with a Raspberry Pi powered arcade cabinet!

Alex had some exposure to Minecraft on the Pi last year but, I was really impressed how willing a six year old was to try coding.
pyconuk 2014 kids programming minecraft
The first thing they said was "Parents hands off, let the kids make mistakes and teach them how to correct them", and I had to fight myself a couple of times from "driving".
See below for the code we wrote(not me).

I also found that was interest waned in typing in log code listings(10 lines) that the mention we could "cheat" brought bright interested faces back for more ;)
pyconuk 2014 robot being led by a child
Here is Joseph with a £10,000 robot, they had 3 plus a newer £4,000 one that did everything and more its older cousins. We were able to chat to the demonstrators and see how the robot could be taught to recognise new object and react and of course do the Gangnam style and the Star Wars story.

pyconuk 2014 quadcopter about to crash
Here is my son trying to kill someone with a iPad controlled quad copter. This was shortly followed by the only near mid air collision, when the other son had control of a second copter.

pyconuk 2014 class room setting
Everybody was really friendly and made sure the kids had the most fun possible while unknowingly learning!

Code listings:

It started simple, the sleep is there to make sure you see the message before it is removed.
import minecraft
import block
import time

mc = minecraft.Minecraft.create()
mc.postToChat("hello joseph and Alex")
time.sleep(5)


Then we created a jet pack that fires Steve 50 blocks into the air. Note the "cheat" of using short variable names.
import minecraft
import block
import time

mc = minecraft.Minecraft.create()
p = mc.player.getPos()
mc.player.setPos(p.x, p.y + 50, p.z)
mc.postToChat("look down")
time.sleep(5)


The guide we were following suggested putting Diamond blocks beneath Steve's feet, but we changed that Beds. Problem is beds are multi block constructs and the following code created a kind of bed-quicksand under Steve.
import minecraft
import block
import time

mc = minecraft.Minecraft.create()
while(True):
    pt = mc.player.getTilePos()
    mc.setBlock(pt.x, pt.y - 1, pt.z, block.BED.id)


When the code called for a rainbow Wool block to build a path, even in the Air, Steve could not get down. We fixed that by checking if the block was not Air before changing it. This created a Rainbow-footstep effect that the kids delighted in painting the world.
import minecraft
import block
import time
import random

mc = minecraft.Minecraft.create()
while(False):
    w = random.randrange(0,15)
    pt = mc.player.getTilePos()
    stoodOn=mc.getBlock(pt.x,pt.y-1,pt.z)
    if stoodOn != block.AIR:
        mc.setBlock(pt.x, pt.y - 1, pt.z, block.WOOL.id,w)


Bolstered by that fun, they created a canon in the world and then run this Rainbow-Canon that cut through Trees and Mountains with impunity!
import minecraft
import block
import time
import random

mc = minecraft.Minecraft.create()
c = 1
while(True):
    w = random.randrange(0,15)
    pt = mc.player.getTilePos()
    mc.setBlock(pt.x, pt.y, pt.z + c, block.WOOL.id,w)
    c = c + 1


Cannot thank the Pycon and Raspberry Pi Foundation enough. "Thank you!"
06 Sep 2014:
Cat in motion bothers pi camera
After getting my Raspberry Pi camera working nicely with Motion I set off on holiday knowing that I could rely on any intruders being captured and stored on an external FTP server.

What I came back to was a mystery.

2014/08/22 test - all OK. Images of me setting motion running are uploaded correctly.
2014/08/23 set and run(me) before motion notices.
2014/08/26 18:31 - Door opened just wide enough for a cat.
2014/08/29 09:12 - Door closed.
2014/08/29 11:10:36 - No obvious changes other than light level.
2014/08/29 11:10:37 - No obvious changes.
2014/08/29 14:49:42 - Pixel blur - possibly cat related.
2014/08/29 14:49:44 - Camera has been dislodged and is now pointing up, appears in motion.
2014/08/29 14:49:46 - Camera has been dislodged and is now pointing up, settled.
... 8x images with minor light and viewing angle changes.
2014/08/30 12:36 - Camera has been moved again but only but 10 degrees.
... 43x images with minor light variances, also three tiny angle changes, almost imperceptible.

This all with the sensitivity set to for 60,000 image size of 1920x1072. The default is 1500 for 352x288.

Now if the images had captured the door being opened and then the cat blur I would be annoyed but I could except that. The cat has been known to zoom to the window sill when he thinks something of interest is going on outside.

Note we have never noted the cat being able to open doors before and never closing them.

We did have someone it to feed the cat and to give him some strokes/entertainment, but I would not have expected them to go upstairs to the office nor close the door if open.

The only reasonable conclusion, using Occam's razor is

2014/08/26 18:31 - Cat opens door.
2014/08/29 09:12 - Door closed by cat tender after searching for cat (he had free roam of the bedrooms).
2014/08/29 14:49:42 - Pixel blur is cat, after very quickly opening door again.
2014/08/29 14:49:44 - Cat knocks camera again.

The other thing that must be assumed is that the Motion settings are not optimally sensitive enough. It should have caught the door opening again.
02 Sep 2014:
What does a seven year old know about Spainish
You know you are out of your depth when in Spain you have to take your seven year old to explain to the petrol attendant that you are at pump six.

To be fair he only knows the 0-10 in Spanish and I know the other basics, "hello", "goodbye", "thank you".
02 Sep 2014:
What time is it Android
When I left the UK and lost mobile service I was not too bothered that the time did not update with the "Automatic date & time, Use network-provided time", after all there was not network provider.
But on returning to the UK I did expect the manually set time(I turned off the afore mentioned setting) to automatically update when I switched the setting on. After all there was now a network provider to get the value from.

No such luck and an hour before I wanted it to the alarm when off. This was following a day of fourteen hours driving with two kids that were not happy about being stuck in a car for fourteen hours.

Talking with other Android users this is known and common occurrence. As soon as I unticked the box and re-ticked it the time happily corrected itself.
loading results, please wait loading animateloading animateloading animate
[More tags]
rss feed

email

root

flog archives


Disclaimer: This page is by me for me, if you are not me then please be aware of the following
I am not responsible for anything that works or does not work including files and pages made available at www.jumpstation.co.uk I am also not responsible for any information(or what you or others do with it) available at www.jumpstation.co.uk In fact I'm not responsible for anything ever, so there!

[Pay4Foss banner long]