Archiv der Kategorie: Software

Die Anfänge

Mein erster Computer war ein  Sharp PC 1211 als Dauerleihgabe von einem Freund um damit T-test und Wilcoxon Test ab 1983 zu rechnen. Konnte immerhin 1424 Zeilen BASIC Code verstehen und sogar ausdrucken.

Getippt hat mir die handgeschriebene Promotionsarbeit eine Freundin auf einer Olivetti Schreibmaschine mit Zeilenspeicher, die Grafiken entstanden auf einem CAD Plotter! bei dedata. Es folgten dann ein IBM XT im Labor und ein ausgeliehener Schneider PC zu Hause …

Wechselrichter mit FritzBox verbinden

Es wäre interessant, die Daten der PV zur Steuerung von Steckdosen zu nehmen. Und zwar ohne teure extra Hardware, Smartmeter, etc. Das geht in der Tat mit einem Fronius Wechselrichter der im Heimnetz unter der URL http://192.168.187.x/solar_api/v1/GetPowerFlowRealtimeData.fcgi die aktuelle Wattzahl im json Format liefert

Die FRITZ!Box kann das zwar im Augenblick nicht verarbeiten (AVM hat es aber als Produktverbesserung akzeptiert) , sie kann dafür aber jederzeit eine Steckdose schalten.

Also stecken wir nun einen Raspberry Pi in die USB Buchse der FRITZ!Box zur Stromversorgung.

Auf dem Raspberry läuft dann lediglich ein cronjob, der in einem Shellscript alle 10 Minuten den Wechselrichter abfragt und ab einer bestimmten Wattzahl dann die Steckdose einschaltet auf der die LiFePO4 Akkus geladen werden.

#!/bin/bash
watt=$(curl http://x.x.x.x/solar_api/v1/GetPowerFlowRealtimeData.fcgi | jq '.Body.Data.Inverters[1].P')
if [[ $watt -gt 200 ]]
then
  http://fritz.box/webservices/homeautoswitch.lua?switchcmd=setsimpleonoff&ain=13077%200012360-1&onoff=1
else
  http://fritz.box/webservices/homeautoswitch.lua?switchcmd=setsimpleonoff&ain=13077%200012360-1&onoff=0

work in progress…

From Markdown to Bookend and back

When writing text in Typora, I need Bookends to insert references.

Export to RTF format for creating the bibliography isn’t a big deal but using the new RTF in Typora needs Pandoc on the command line as Typora’s import function is broken.

brew install pandoc
pandoc --wrap=none --extract-media=images -f rtf -t markdown myfile.rtf -o myfile.md

Seems that pandoc destroys footnotes and inline images making this combination not a first choice for larger documents.

Why I changed my markdown editor from Atom to Typora

I have been customizing Atom over the years but moved recently to Typora  as it has it all built in. Typora will hopefully work also with long documents (which I haven’t tried so far). There is a

  • great focus mode
  • seamless import of figures
  • LaTeX WYSIWYG
  • Flowchart and Mermaid integration
  • and I can insert my Bookend references (via RTF export)

Good scientific graphics

I have lectured about good graphics more than a decade ago – basically introducing Edward Tufte as the “Leonardo da Vinci” of data. With the beginning of 2022  I am now absolutely overwhelmed by the number of excellent tutorials out there. Here is my recommended  list

youth is no guarantee of innovation

I learned only recently about the 2012 James Bond dialogue in the movie Skyfall where he talks to the new and much younger head of Q branch.

Q: Age is no guarantee of efficiency
Bond: And youth is no guarantee of innovation

Nice to see that I recently earned a new Stackoverflow badge while the last SO report says that 90% of all software developers are younger than 45.

The Python nightmare: How to install mask_rcnn and detectron2

Coming from R the most exciting thing with Python is the incompatibility of the different modules…

While I can recommend the Anaconda Navigator, the following commands work only in the terminal.

Thanks to Nouman945 for help with the original mask_rcnn instructions.

conda create --name matterport python=3.6.13 tensorflow==1.15.0 Keras==2.2.4 h5py==2.8.0 pip
conda activate matterport
git clone https://github.com/matterport/Mask_RCNN.git
cd ./Mask_RCNN-master
python -m pip install -r requirements.txt
git clone https://github.com/philferriere/cocoapi.git
python -m pip install pycocotools
python -m pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI
wget https://github.com/matterport/Mask_RCNN/releases/download/v2.1/mask_rcnn_balloon.h5 > Mask_RCNN/mask_rcnn_coco.h5
conda deactivate

For detectron I follow basically detectron2.readthedocs.io

conda create --name detectron2 python=3.6.13 tensorflow==1.15.0 Keras==2.2.4 h5py==2.8.0 pip
conda activate detectron2
conda install pytorch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0 -c pytorch
git clone https://github.com/facebookresearch/detectron2.git
CC=clang CXX=clang++ ARCHFLAGS="-arch x86_64" python -m pip install -e detectron2
conda deactivate

Last but not least the installed apps:

The Apple Keynote Feature we have been waiting for

Apple updated last month Keynote with a feature we have been waiting for years – live video which is super cool to show live internet pages from active polls.

 

insert video only works from the top menu

There is no video source connected at the beginning but can can be added from the right side menu.

Unfortunately the virtual camera of OBS is not recognized but I could easily connect my Blackmagic Atem Mini so I have direct access to any source coming from a second computer running Chrome, Ipad with Sketchbook  and of course  the Z6 HDMI video signal.

 

adding the ATEM Mini from the right menu

 

A comparison of image duplication software

A quick comparison without pretending any objectivity

 Open SourceCommercial / Restricted AccessWebUpper Limit ImagesSpeedSensitivitySpecificityComment
Image Verification AssistantNNY1***
ForensicallyNNY1*****
FotoForensicsNNY1****
DiplopiaNNY>500*****my own proof of principle pipeline
ImageTwinNYY10*******
LpixelNYY50????
ProofigNYY50?*****
DropletsYNN1***
ImageJYNN1???
SherloqYNN1NANANAgood toolbox
TinEyeNYY*******full images only per request
figcheckNNY1???out of order 15/10/21, scam?
BioVoxxelYNN1???toolbox
max rating is ***

 

Geschützt: When a scientific journal is modifying your images

Dieser Inhalt ist passwortgeschützt. Um ihn anschauen zu können, bitte das Passwort eingeben:

False dichotomies

“The false dichotomy between private interest and public good” by https://www.nuffieldbioethics.org/blog

‘Good’ and ‘public benefit’ are subjective concepts and will vary according to individual perceptions and context. Private and public interest are inevitably intertwined and pitting them against each other creates a false dichotomy. For example, if patients cease to trust their clinicians or more broadly the NHS, public good will suffer. Furthermore, extensive exploration of public attitudes towards sharing medical data has found that people approve in general for their data to be used for medical research and for ‘good causes’, whether environmental, social or medical, but they do not approve of their data to be used for commercial purposes or for powerful companies to profit at society’s expense.

Finally I understand JS (a bit)

It produced a lot of headaches. And yes, it has been described already that

as a lot of articles I read about async in JavaScript, especially those that came out around the time ES2015 (ES6) was new, are just plain wrong. I’m going to clear up the falsehood by presenting a real understanding of the way async works in JavaScript.

Some nice examples are at medium.com and freecodecamp as well as a vid at youtube
.

At the end – I have some working code here, that shouldn’t work according to my understanding of concurrency.