Export Apple Photos to the Filesystem – Apple Script

I have never really used Apple Script, but recently had the desire to backup all my Apple Photos to my local NAS. I currently have all my photos organized in a Folder -> Album structure so pulled this Apple Script together together to get this done. Create a new Apple Script (*.scpt) and select the source Photos Folder and a location to save the files on your filesystem. Note: Slashes in the name case folders to be created 🙁

https://gist.github.com/paschmann/536def178ea9dd96c22c2143cc2b212c

Building a Passkit App

Building an Apple PassKit app has been an interesting endeavor. Internally at SAP we recently built a small Business Card application which allows employees to create a digital business card, and subsequently generate a individual and customized wallet pass, allowing them to quickly retrieve it, without having to find the app, and open it on their device. Having a wallet pass lets users simply double tap the lock button, authenticate and see a collection of their passes.

Open Source Project: Reach SDK

Over the past few years I have found myself re-implementing and re-writing basic features of server, web, mobile or service components. Registration, Login, Forgot Password, Notifications, Search, Help, FAQ, Contact Us, Maps are just a few I can think of, where half way through the development everything seems familiar and I have a case of deja vu. No doubt I have written or implemented a library or service which performs this specific function.

While developing the Changd app I found myself in one of the deja vu moments while writing the email notification service, and decided to pause development, and fix the root cause. After multiple Github issues to support a variety of notification providers, I came across Apprise, a python library which supports multiple notification provides. Since there was not a Node.js implementation, I decided to use Apprise as inspiration and influence for a Node.js library which I aptly named “Reach”. read more

Publishing packages to NPM

These are the notes/process I used when developing the Node Reach SDK package:

The “Standard” Release Process

Here is my understanding of the steps that are most commonly expected to be run when publishing a new version of an npm package.

  1. Safety Checks:
    1. git pull
    2. git status
    3. npm ci
    4. npm test
    Prepare the Release:
    1. npm run build
    Update the Changelog Update the Version Number:
    1. npm version
    2. Or by hand:
      1. Update version in package.json & package-lock.json
      2. git commit -am ‘2.0.0’
      3. git tag v2.0.0
      Publish to npm:
      1. npm publish
      Publish to Git:
      1. git push
      2. git push –tags
      Create a GitHub Release (optional)

Drawbot

A fun project to build a drawing bot which uses linear motors, belts, and a servo to take digitized line art and physically draw it on paper, in a plotter like fashion. Here are a couple resources which are helpful.

https://drawingbots.net/knowledge/tools

One of my intentions is to draw golf course layouts and their corresponding contour lines, this site has the relevant height lines.

https://anvaka.github.io/peak-map/#12.39/35.20202/-81.03753

Process:

Use a Inkscape extension to convert SVG to line art: https://github.com/love-open-design/LY-Drawbot-Tool-by-LOD

LY Drawbot – Workflow

Inkscape SVG -> Object to Path (If needed) 

Extensions -> Generate GCode for LY Drawbot read more

DIY: Physical Random Number Generators

One of the benefits of Quantum Computing is their ability to generate truly random numbers.

Since classical computers are deterministic machines, governed by algorithms, they are inherently predictable. Therefor any number generated by a classical computer, even if it seems complex is actually based on a set of conditions or algorithm, which therefor makes it a “pseudo random number”, rather than truly random.

To generate truly random numbers you need to rely on a physical processor or phenomena that are unpredictable, examples of this include radioactive decay, electronic noise or even atmospheric noise.

Since QC is essentially based on a physical process and the probabilistic nature of quantum mechanics, its qubits can exist in a superposition state, this means they can represent a combination of 0 and 1 simultaneously, this state/property can be harnessed by QRNG (Quantum random number generators) to produce truly random numbers.

As a fun project, I decided to build a small physical QRNG using an Arduino, laser diode, beam splitter and two photo resistors. The basic premise is that you pulse the laser, it sends a wave/particle (both!) through the beam splitter, 50% of the time it should hit one of the two photo resistors, providing you with a random string of “1”s or “0”s.

While a very simple, basic and small example, it is a fun experiment. Check out OpenQbit.com if you would like to build your own. To make this a little easier, I laser cut a template/outline for the beam splitter for holding each of the components.

Enjoy Randomness? Check out these blog, sites, references: http://www.reallyreallyrandom.com

Non Quantum RNG generator using zener noise: http://www.reallyreallyrandom.com/zener/breadboard/

Nice video explaining the seed variables used and middle squares: https://www.khanacademy.org/computing/computer-science/cryptography/crypt/v/random-vs-pseudorandom-number-generators

Generating Random Numbers with QisKit & IBM Quantum Hardware

Generating true random strings using classical computers is not as easy as you may think. Unlike deterministic processes that follow specific algorithms and patterns, achieving true randomness poses a challenge in the realm of classical computing. Classical computers operate based on predetermined instructions and logical operations, which inherently lack the inherent unpredictability required for true randomness.

In contrast, true randomness involves an element of unpredictability that goes beyond the deterministic nature of classical computing. Attempts to generate random strings on classical computers often involve algorithms that simulate randomness, but these are ultimately constrained by the deterministic nature of the underlying hardware and software. read more

Generative Art Resources

During the NFT hype, generative art got a lot of attention due to its ability to programmatically, and algorithmically generate designs and art. These are a few resources I used and developed digging a little bit deeper into the subject.

Skill Share Course: https://www.skillshare.com/classes/Programming-Graphics-I-Introduction-to-Generative-Art/782118657

  • Coding Train by Daniel Shiffman — one of the authors of Processing. A talented and cheerful teacher who will change your perception of teaching.
  • Awesome Creative Coding on Github — most useful links on your way to becoming a generative artist
  • Openprocessing — place when you can find and share works using P5.js and Processing
  • Programming Graphics от Joshua Davis — the best motivating creative coding course in the web (in my humble opinion)
  • read more

    Have some time?

    This single list of link has fueled a lot of reading for me over the past few months … The most counterintuitive facts in all of mathematics, computer science, and physics:

    It is possible to compute over encrypted data without access to the secret key: https://en.wikipedia.org/wiki/Homomorphic_encryption It is possible to prove that you know a value x, without conveying any information apart from the fact that you know the value x: https://en.wikipedia.org/wiki/Zero-knowledge_proof It is possible to play poker by telephone in a trusted way which prevents cheating: http://math.stonybrook.edu/~scott/blair/How_play_poker.html If customers take on average 10 minutes to serve and they arrive randomly at a rate of 5.8 per hour then the waiting time for one teller is five hours while the waiting time for two tellers is 3 minutes: https://www.johndcook.com/blog/2008/10/21/what-happens-when-you-add-a-new-teller/ There exists a set of three dice, A, B, and C, with the property that A rolls higher than B more than half the time, and B rolls higher than C more than half the time, but it is not true that A rolls higher than C more than half the time: https://en.wikipedia.org/wiki/Nontransitive_dice Causation does not imply correlation: https://arxiv.org/abs/1505.03118 The Earth makes 366.25 rotations around its axis per year. (Related: 0% selected the right answer on this SAT question: Circle A has 1/3 the radius of circle B, and circle A rolls one trip around circle B. How many times will circle A revolve in total? youtube.com/watch?v=kN3AOMrnEUs) There is a surface that has only one side: https://en.wikipedia.org/wiki/Mobius_strip It is possible to travel downwind faster than the wind: 

    youtube.com/watch?v=jyQwgBAaBag read more