The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,861 other subscribers

Archive for the ‘Scripting’ Category

Common SMTP message size limits

Posted by jpluimers on 2020/04/08

After a 2018 discussion with a “zorgkantoor” (Dutch for office that arranges for special long term health care needs, successor of AWBZ) about their very low (10 megabyte) SMTP message size limit – even though they expect scanned PDF documents.

Their web-care team posed this limit as normal, so I made a list of limits in their peer group, common world-wide and well-ranked Dutch internet providers.

My plan is to check the progression of these limits over time.

Note these are the bruto message sizes including encoded attachments. Since encoding in [WayBack] MIME Base64 – Wikipedia has a overhead of at least 37% (encoded size is at least 1.37 the original size), the unencoded maximum size is less than 73% of what is listed below.

References:

2018

Read the rest of this entry »

Posted in base64, Communications Development, Development, eMail, Encoding, Internet protocol suite, MIME, Power User, Python, Scripting, SMTP, SocialMedia, Software Development, TCP | Leave a Comment »

In SQL Server use `SET NOCOUNT ON` so tools taking the last modified record count won’t be confused by your trigger.

Posted by jpluimers on 2020/04/07

Interesting read: Time eating bug of the day… – Fabian S. Biehn – Google+.

TL;DR: in SQL Server use SET NOCOUNT ON so tools taking the last modified record count won’t be confused by your trigger.

Source: [WayBackTime eating bug of the day: I used a TADOQuery.ExecSQL (on Berlin) for an Up…

Related: [WayBack] sql server – ADODB affected rows return trigger’s affected rows – Stack Overflow

–jeroen

Posted in Database Development, Delphi, Development, Office VBA, Scripting, Software Development, SQL, SQL Server | Leave a Comment »

For my link archive: Python – Handling command-line arguments

Posted by jpluimers on 2020/04/02

The article is dense but goes way deeper than straightforward sys.argv[1:] handling: [WayBack10.6. Handling command-line arguments.

–jeroen

Posted in Development, Python, Scripting, Software Development | Leave a Comment »

Forde’s Tenth Rule, or, “How I Learned to Stop Worrying and ❤ the State Machine”

Posted by jpluimers on 2020/04/01

It is important to look beyond your own comfort zone to see what other languages can support: [WayBack] Forde’s Tenth Rule, or, “How I Learned to Stop Worrying and ❤ the State Machine”.

The article is about implementing finite state machines in JavaScript with as little usage of string literals as possible.

Via: [WayBack] How I Learned to Stop Worrying and Love the State Machine – Adrian Marius Popa – Google+

–jeroen

Posted in Development, JavaScript/ECMAScript, Scripting, Software Development | Leave a Comment »

Printing all DNS records using DNSPython in Python 3 · GitHub

Posted by jpluimers on 2020/03/31

Cool example, which requires dnspython and might need an update of the DNS record type list (maybe dnspython has that list built in?):

[WayBack] Printing all DNS records using DNSPython in Python 3 · GitHub

–jeroen

Read the rest of this entry »

Posted in Development, Python, Scripting, Software Development | Leave a Comment »

GitHub – alexmojaki/birdseye: Quick, convenient, expression-centric, graphical Python debugger using the AST

Posted by jpluimers on 2020/03/26

This is soooo nice! [WayBackGitHub – alexmojaki/birdseye: Quick, convenient, expression-centric, graphical Python debugger using the AST

It runs on localhost:7777

Via: [WayBack] Birdseye ist eine interessante Lösung, um detailliert nachzuvollziehen, was beim Aufruf von Python-Funktionen und der Abarbeitung von Schleifen geschieh… – Martin Vogel – Google+

–jeroen

Read the rest of this entry »

Posted in Development, Python, Scripting, Software Development | Leave a Comment »

python – How do I install pip on macOS or OS X? – Stack Overflow

Posted by jpluimers on 2020/03/25

On Mac OS X with stock Python:

All you need to do is

sudo easy_install pip

After this, you might want to upgrade pip:

sudo pip install --upgrade pip

Source: [WayBackpython – How do I install pip on macOS or OS X? – Stack Overflow

You could go the homebrew way, but that means your system will have two Python installations usually causing a nightmare of path dependency orders. In addition, homebrew puts you on the wrong foot, so:

DO NOT DO THIS!

# brew install pip
Error: No available formula with the name "pip" 
Homebrew provides pip via: `brew install python`. However you will then
have two Pythons installed on your Mac, so alternatively you can install
pip via the instructions at:
  https://pip.readthedocs.io/en/stable/installing/

–jeroen

Posted in Apple, Development, Mac OS X / OS X / MacOS, macOS 10.12 Sierra, macOS 10.13 High Sierra, Power User, Python, Scripting, Software Development | Leave a Comment »

bash – How to add a progress bar to a shell script? – Stack Overflow

Posted by jpluimers on 2020/03/17

From [WayBackbash – How to add a progress bar to a shell script? – Stack Overflow (thanks Mitch Haile!):

You can implement this by overwriting a line. Use \r to go back to the beginning of the line without writing \n to the terminal.

Write \n when you’re done to advance the line.

Use echo -ne to:

  1. not print \n and
  2. to recognize escape sequences like \r.

Here’s a demo:

echo -ne '#####                     (33%)\r'
sleep 1
echo -ne '#############             (66%)\r'
sleep 1
echo -ne '#######################   (100%)\r'
echo -ne '\n'

–jeroen

Posted in *nix, *nix-tools, bash, bash, Development, Power User, Scripting, Software Development | Leave a Comment »

Practical Deep Learning for Coders 2018 · fast.ai

Posted by jpluimers on 2020/03/11

I’ve read this twice and need to re-read this a few times, so from my reading list then need to follow the course one day: Practical Deep Learning for Coders 2018 · fast.ai [WayBack].

… deep learning course based on Pytorch (and a new library we have built, called fastai), with the goal of allowing more students to be able to achieve world-class results with deep learning. … this course, Practical Deep Learning for Coders 2018 [WayBack], … The only prerequisites are a year of coding experience, and high school math (math required for understanding the material is introduced as required during the course).

Related: [WayBackThe Matrix Calculus You Need For Deep Learning – Terence Parr and Jeremy Howard

Via:

–jeroen

Posted in Development, Python, Scripting, Software Development | Leave a Comment »

GitHub – mgedmin/check-manifest: Tool to check the completeness of MANIFEST.in for Python packages

Posted by jpluimers on 2020/02/27

I will need thi sone day: [WayBack] GitHub – mgedmin/check-manifest: Tool to check the completeness of MANIFEST.in for Python packages

Are you a Python developer? Have you uploaded packages to the Python Package Index? Have you accidentally uploaded broken packages with some files missing? If so, check-manifest is for you.

Via: [WayBack] check-manifest: a tool to check the completeness of MANIFEST.in for Python packages  – ThisIsWhyICode – Google+

–jeroen

Posted in Development, Python, Scripting, Software Development | Leave a Comment »