• Please Remember: Members are only permitted to share their own experiences. Members are not qualified to give medical advice. Additionally, everyone manages their health differently. Please be respectful of other people's opinions about their own diabetes management.
  • We seem to be having technical difficulties with new user accounts. If you are trying to register please check your Spam or Junk folder for your confirmation email. If you still haven't received a confirmation email, please reach out to our support inbox: support.forum@diabetes.org.uk

On the subject of technical independence.

Docb

Moderator
Relationship to Diabetes
Type 2
I have on occasion indicated my desire of being as free as possible from the prying eyes, bloated software, continuous updating and planned obsolescence of the likes of Meta, Google and Apple. The stumbling block has been my Access database which contains all my blood glucose data. Well I am on the way to getting round that by writing a python application to do the job. If I can get that to work then I will be able to satisfy my computing needs with this little black box....

1748286003421.png

which contains a raspberry pi 5 and SSD running PiOS. It runs just as fast as my big black box never pesters me to update it and I tell it what to do rather than it telling me.

Might take me a while to get my application sorted completely but happy days.

When I have got python sorted, I think I might learn to write in Japanese characters, it will probably be easier.
 
I like your attitude. I too try to avoid all the apps with tracking and lack of privacy.
Too many companies use that button marked 'click here to agree we can do what the heck we like with your data' 😡
Cookies? Mine are locked down hard and privacy badger also used - I sometimes encounter sites which don't even work with my restrictions and occasionally have to edit them 🙄
Obsolescence will always be a big risk as you are well aware, so I look to future proofing by using files that can be transferred / opened by a few different apps.
 
Well, I now have a programme written in python that has all the functionality of my access data data base including prediction of HbA1c from my blood glucose readings. Currently predicting 45 which is very close to my last result. Maybe not as pretty as Access but totally independent of the big data sniffers. Next move is to compile it into an executable. More new territory, more hours of fun getting all the commas in the right place.
 
More new territory, more hours of fun getting all the commas in the right place.

Congrats @Docb

Always enjoy the technological rabbit holes you dive down.

Ah yes… the missing comma… the forgotten semicolon… the mistakenly overlapping )} );

And they told me at school that there was no point me thinking of working with computers because maths wasn’t my favourite subject.

All the programming I’ve ever done has had far more to do with syntax, sentence structure, and proof reading!
 
All the programming I’ve ever done has had far more to do with syntax, sentence structure, and proof reading!

Absolutely @everydayupsanddowns - they don't call them programming languages for nothing.

First attempts at compiling have gone well up to a point. After much playing i got an installer loaded and yey, get the bits in the right directories, all the commas in the right place and don't forget the double dash before adding arguments to the installer and you get an executable file! Double click on it and you get the start screen of my python script. Input some data and it works. Click on the summaries button and up pops the frame with the summary data. Click on the buttons for the graphs......nothing. More fun trying to figure out why. There has got to be a reason.........
 
Maybe not as pretty as Access but totally independent of the big data sniffers.
Interesting, have you tried e.g. PyQt - it can be made quite pretty.

Also, if you're running a Linux box why not just call/run the Python code directly rather than compiling it to a binary executable?

If you add a hash bang (#!) at the top of your entry point Python file the shell will run it with Python (e.g. "#! /bin/env python" or "#! /usr/bin/python" without the quotes), alternatively you could use a shell script to call the Python code (which is sometimes easier when dealing with command line arguments, depending on what you're used to.)
 
Thanks @SimonP - sounds like you might know what you are doing whereas I'm a right amateur and enjoy the puzzling.

Haven't come across PyQt but will have by the end of the afternoon I am sure. I'll also try the alternatives you suggest if the rabbit hole I am currently going down comes to a dead end. Much of what I am doing is a learning exercise. Trouble is these days what I learn one day has disappeared by the next.
 
The good thing about PyQt is that there are lots of examples about. There's also PySide (it's all quite complicated: https://www.pythonguis.com/faq/pyqt5-vs-pyside2/) but you can use some boilerplate code to import whatever is available as they are fairly compatible. Note that the majority of examples you'll find online are for PyQt, so that's always my preference, though as PySide is apparently now the official UI implementation this will presumably change eventually.

Give me a shout if you've got any questions, I can't claim to have the same expertise in Python that I do in MATLAB, but I've been using both Python+PyQt and before that Qt (C++) for quite a few years.

P.S. Stick to Python3 these days too rather than doing anything with Python2. There were some changes which mean they are not compatible without modifications - you can tell what version a piece code is targeting at a glance by looking at the way the "print" statement is used.
 
Using python3 with the current PIOS on a raspberry pi 5 with an ssd. My target, as much as a learning exercise as anything, was to write something where I could enter my blood glucose data and save it to a csv file and then press buttons to get summary stats and plot a few graphs. I have got something working using tkinter to get a gui, matplotlib for much of the maths, pandas and several other libraries to do one thing or another. A pro would look at it and laugh - I am sure the whole thing would be done using one third the code by anybody without an L plate, but it works.

Deciding to try and find out what compilation was all about I found installer. Eventually got that installed (python3 and PIOS complicated that) and got an executable in which every thing worked except when when pressing a button calling for anything involving matplotlib. A bit of internetting suggests that there are problems with installer and matplotlib and have yet to find a solution for my set up.

After your prompting I have found PyQt which would replace tkinter and and also found plotly which would replace matplotlib. I feel a complete rewrite coming on......hours of fun.

Thanks for the interest.
 
I know next to nothing about tech. My late brother who sadly died 15 years ago in his early 50's was my tech guy. He was anti microsoft though Bill Gates now appears an angel compared to other tech bros. We used to buy my brother an annual subscription to a Linux mag his preferred system. I suspect it is now very old hat.
 
Using python3 with the current PIOS on a raspberry pi 5 with an ssd. My target, as much as a learning exercise as anything, was to write something where I could enter my blood glucose data and save it to a csv file and then press buttons to get summary stats and plot a few graphs. I have got something working using tkinter to get a gui, matplotlib for much of the maths, pandas and several other libraries to do one thing or another. A pro would look at it and laugh - I am sure the whole thing would be done using one third the code by anybody without an L plate, but it works.

Deciding to try and find out what compilation was all about I found installer. Eventually got that installed (python3 and PIOS complicated that) and got an executable in which every thing worked except when when pressing a button calling for anything involving matplotlib. A bit of internetting suggests that there are problems with installer and matplotlib and have yet to find a solution for my set up.

After your prompting I have found PyQt which would replace tkinter and and also found plotly which would replace matplotlib. I feel a complete rewrite coming on......hours of fun.

Thanks for the interest.
But if it's largely working I'd not necessarily encourage you to move it all over unless you really want to.

Is "installer" the name of the Python package? Seems like a poor choice of name by the author as it makes it very hard to search for! :D

Any more details on the problem itself? I might be able to help, otoh I might not!

Re installing things on any of the RPi systems, you can also look at the Debian help (and indeed packages) as they use the same system for the most part.
 
I know next to nothing about tech. My late brother who sadly died 15 years ago in his early 50's was my tech guy. He was anti microsoft though Bill Gates now appears an angel compared to other tech bros. We used to buy my brother an annual subscription to a Linux mag his preferred system. I suspect it is now very old hat.
Linux certainly isn't old hat, and at least one of the Linux magazines still exists (Linux Format) though others have wound up shop due to low readership (which was probably very low even when people used to purchase magazines.) I am subscribed to it via my library Borrowbox account and sometimes read it once I run out cycling magazines and New Scientists to read - it is good in terms of the details and relevance of articles and general lack of fluff, along similar lines there's a free monthly pdf download official Raspberry Pi magazine for those interested (from the RPi website).
 
Back
Top