Showing posts with label foss. Show all posts
Showing posts with label foss. Show all posts

Wednesday, May 12, 2021

Boomer Gallery

I started watching Bubblegum Crisis: Tokyo 2040. It has robots and androids, collectively known as "boomers". "Boomer" already has a meaning, so funny double meaning scenes were unavoidable. So, I decided to take a screenshot every time someone says "boomer".

For this task, I first extracted the subs in VOBSub format with MKVtoolNix, then converted them to SRT (text) with FFMES. I then made a Python script that uses the srt library to look for occurences of a word and return the time codes when it appears. Use it like

./rip.py subs3.srt boomer| tail -n+2 | cut -d " " -f 7 > k3.txt

I was going to use FFMPEG to extract the screenshots, but turns out, it's easier with mpv Here's line I used: 

mpv --quiet --no-audio --vo=image --start=0:03:02.309000 --frames=1 --vf=sub 01\ Can\'t\ Buy\ a\ Thrill.mkv

I made another script that gets the shots at the specified times.

Thursday, May 30, 2019

Daily Dharma, part Deux

Similar to my short-lived Twitter bot, I recently tweaked my virtual server's Message of the Day to dynamically display a verse from the Dhammapada on login, framed by diamonds using "boxes". This is a guide on how to achieve this on a Debian system.
Dharma Jewels
First, install "display-dhammapada" and "boxes" with apt.

Create a directory with the path "/etc/update-motd.d/" and add your scripts under that directory with names starting with priority numbers. For example, I have "20updates" in there. Here it is:

#!/bin/sh
echo `dhamma` | fold -w 25 -s | boxes -a hcvc -d diamonds
echo "date   is $( date   )"

Then, chmod a+x /etc/update-motd.d/*
Then, edit "/etc/pam.d/sshd" and find the line with "motd". Change the path to

session    optional     pam_motd.so  motd=/var/run/motd

That should do it!

Edit: It did, in fact, do the trick for a while. However, then the MOTD would no longer get updated. I fixed it by changing the line in "/etc/pam.d/sshd" to


session    optional     pam_motd.so  motd=/run/motd.dynamic

The last dynamically updated MOTD before the unexplained break was this:
All processes are impermanent. When one sees this with understanding, then one is disillusioned with the things of suffering. This is the Path of Purification.
So, do not be surprised when things don't last.

Tuesday, September 6, 2016

Language learning

I just came across a nifty little script for the awesome mpv media player. I made a slight improvement to it: multiple language support, seeing as I always like to have subtitles, in case I can't make out a word, and because I find that having subtitles in a language you're learning, provided the audio is in a language you can understand, is a great way to keep in practice.
Here are some other resources I have used in learning new (human) languages:
  • Duolingo
    • Very nice interactive language training, free!
  • Free Rice
    • Best for building a vocabulary, this site has many subjects besides languages, and also works like the Hunger Site, in that your clicks give food to those suffering from starvation.
  • CouchSurfing
    • The way to learn to speak a living language is to converse. Having guests over, or visiting people in areas with other languages, is a great way to make that happen.
  • ConversationExchange
    • A neat way to find foreign-language pen-pals, this site lets you lists languages you know, those you'd like to learn, and will do the match-making for you.
  • Bookmooch
    • Another way to learn is to read in the language you're learning. Bookmooch will help you find books to read, especially if the language you're trying to learn is english - which most of the books on offer are in.

Wednesday, March 30, 2016

Old Memes are Old

I was recently trying a USB thermal printer, and I wanted to test the improved image handling in python-escpos, courtesy of my friend Zouppen. First of all, do not buy this printer. The print quality is extremely shoddy; I get a rorschachuesque splotch when I try to print a solid-black block.
So anyway, I needed a vertically long image to test, and what is long? Longcat is long. I usually scoff at meme propagation, but what the hey. So, here is a longcat generator. Base image by some fine dude on an imageboard somewhere. And here's the result:
The code is forkable on Github. Essentially, it's missing a "save stitched image file as..." button. I printed the image as PDF, then used ImageMagick to convert the file to GIF (understood by the printer).

Monday, July 20, 2015

Some fabric designs

So I've added a new site, Spoonflower to the About me - sites section. There's a couple of fabric designs available, there. I'm also looking for work in this area - probably on a per-design basis.
The basis for the other design is one that I drew freehand some time ago, and now traced in Inkscape. There is a losslessly zoomable SVG version online.

Tuesday, November 29, 2011

Ask the Natives

There's been a lot of hubbub about degrowth, and countercomplexity in general. One of my favorite parables for the currently/previously (you may say that I'm a dreamer, and all that) idolized consumer hysteria vs. a more sparing, resource-based model is the tale of the Buffalo. Now, as a technology advocate, I'm particularly worried about the way we're handling the globalization of things like smartphones, etc, due to their dependence on "rare earth" - metals and other highly precious substances, sought after at great cost. So, I thought I'd share an example of getting more out of less through the power of sharing and the open-source mentality.
The Buffalo I have has several tails, each of them leading to a computer (some through the airwaves, others through a cord). When put side by side with the animal, only the method of consumption is different - in both cases, even the tail delivers sustenance.
Now, the network topology of our apartment used to be such that there was the wireless access point, then a PC for a router (running pfSense), and then the client devices. Now, the router PC was a recycled one when it got to me, but by leveraging the Power of Open Source™, I was able to integrate all of the functionality to the Buffalo router, thereby doing away with one power-chugging 24/7 machine, and a source of background noise in the apartment. The Buffalo, of course, is completely silent!
That was the really useful part. The crazy part is after the break.
break;
That was the really crazy part. Now this is the useful part.
Let me tell you another story. Star Wars. When I read the Making Of, I was intrigued to learn that Lucas sent out "sound scouts", to look for material for the special effects. Sound scout! I'd been in the scouts when I was younger, but that sounded like something else! Looking for sounds... no... I mean, yes! Looking!
Whoa whoa whoa. So... looking for sounds is one thing. But would it be possible to look... at... sounds?
So that's how I got to VJ'ing, audiovisualism, etc.
But let's elaborate on Alice in Quantumland. If a photon is in superposition with all  the photons, could this be exploited for purposes of time travel? And if so, how could one choose the destination? Well, this is where things get interesting - but let me return to our frame of reference, the Original Trilogy, part V - where I first learned the word sond (which was used to describe the Imperial probes seen at the beginning).  The dictionary definition:
a message or messenger
So. A picture was forming - I've taken to calling it the Rembrandt effect, and postulate it thusly:
every work of art is a self-portrait; furthermore, every work of art is a reflection of its own creation
Of course, the degree to which this is true varies for every piece, etc, but to corroborate, compare the sond scouts and the sound scouts... I mean, every experienced scout knows that the first rule of ego-death is that there is no "U" ;)
Anyway, the link there leads to two fascinating answers: music (a subset of sound that is of truly paramount importance), and the uncertainty principle (that which gave rise to the original problem of how to navigate). To reiterate: music is the answer. In a broader sense, sounds are the key to navigating the light. Why? Due to the wave-particle duality: sounds, such as speech, music, clangs, pings, wooshes, anything and everything channel different energies. So this is the same principle at work as when transforming sound into images - except vice versa.
But what about the absolutes? (as a side note, there's been research into this very topic for ages and ages!). I mean, edging like scouting the hiss can take you far... but only so far. So what's the absolute furthest reach?
Well, there's been... theories and speculation for different vessels (the idea of a "Song of Songs", for one... but these tend to culminate in the pointing out of a common property). I thought there might be a more direct route.
And now we get back to the break. The silence. That was the challenge. To scout the sounds is one thing... But how quiet can you get? What is absolute zero, and what's left once you get there (notice how words become increasingly meaningless, as there'd be nothing left nor anywhere else - but bear with me here...)?
Well, as the link goes to show, even at the very lowest reached temperatures, the quantum spin states tend to remain... and, due to the "single-photon-all-photons, but waves travel at a certain speed when measured" dual nature, that's enough (this is getting closer to presenting Asimov's Last Question than answering it...). The simple answers for "how and why would the universe re-create itself, if all were to become Death Absolute?" are, respectively, "inevitably and out of necessity".