It is always advisable to have a backup from your own Medium.com Stories. Unfortunatelly, there is no one stop or even automated backup method by Medium.com, so let’s see a workaround.
We will use the Medium.com’s ‘Download your information’ feature to save all our posts as backups, but that doesn’t includes the pictures — so this is only the first step to make a proper backup.
Click on Settings in Medium.com’s user menu:
Select Account, then click on the button ‘Download.zip’ at the Download your information section:
If your python scripts runs on a machine with a speaker to you, the scripts don’t need to be silent during the run. Besides the boring command line and log file output of logging messages, let’s make it interesting!
The idea is simple: let’s combine a text-to-speech engine with the logging of Python. We will use a free and offline tts engine, the pyttsx3. This is offline, so no internet traffic will need it to be used. The cons are, it is only in English and there are much better tts voices out there at the cloud service providers.
Let’s say we have a datetime column and want to calculate the number of working days till the current time.
At first spot it seems like an easy thing, as SQL has the DateDiff function. However, it does not exclude the weekends:
If you have a cluster of Windows machine but you don’t have a resource manager installed, don’t worry! Windows has it’s tools out of the box to start or stop running tasks from remote.
First of all, you need to have the infrastructure — each are Windows machines with remote desktop connection enabled, physical desktops or a VM on the same LAN:
Then there should be a batch file, a script or an exe you want to run on each workers in the same time. This will be in our example:
I wanted to download file — actually a batch of files — from a site which needed domain user authentication. I saw several examples which uses the simple Username/Password authentication, but I wanted to avoid to hardcode my domain password into the python script…
I just found a nice python package for a solution: requests-negotiate-sspi: Windows SSPI-based Negotiate authentication support for Requests:
An implementation of HTTP Negotiate authentication for Requests. This module provides single-sign-on using Kerberos or NTLM using the Windows SSPI interface.
This module supports Extended Protection for Authentication (aka Channel Binding Hash), which makes it usable for services…
Sometimes I need a quick script to read all specific tags in a plenty of XML files and make a report of them — e.g. show which nodes have the same values in a given attribute like an ID. Instead of writing a .net app, this task can be solved simply by PowerShell as well.
First, we have a batch of XML files in a folder. These XLIFF files in may case, so included all files with extension starting by x char.
Then let just list the IDs of each <trans-unit> tags:
If you have different XML structure and…
I got an old but still working Gazelle Orange Plus Innergy two years ago from second hand. It worked well seamlessly at that time, but I knew the stock battery (with its 6 years!) will not last long. Finally, it worked for more 1.5 years which was quite a good surprise.
After that, it started to loose power very quickly and after a heavy rain it went dead completely. As the cyclic mechanics and (maybe the motor HUB also) should still work 10 more years, I decided to renew the ebike myself.
I wanted the keep the Gazelle’s original smooth…
DIY Android app controlled robot. Manual control to go forth and back, turn and swing it’s ‘eye’ (ultrasonic sensors).
You can buy and assembly the parts separately (the harder way) or you can just order (almost) all in a pack what we need (the simpler way):
DIY pack of keyestudio’s Mini Tank Robot
Why is publishing WordPress post from OneNote is so difficult? No, it should not be difficult.
I love OneNote: it gives freedom to take notes on several levels: available on both PC and Android, easy to create new page, easy to organize several pages on multiple level and comes with an excellent WYSIWYG editor with image and video embedding (well at least on Windows).
So I often start the guides and tutorials as a OneNote page during the development. Then the only question, how to publish a OneNote page to WordPress without any difficult and manual overhead? …
I’m using Visual Studio for C# stuff, but I didn’t found a free proper solution to use the OpenCV SDK for Android development in VS (Xamarin). OpenCV (Open Source Computer Vision Library) is an open source computer vision and machine learning software library — which is a must have for DIY Robot projects in Android App dev. Also, I preferred Android Studio over Eclipse for Android development just to follow Google’s plans. Unfortunately, I didn’t find any tutorial of OpenCV’s portal to set up it for Android Studio. …