I've been scanning a bunch of records with Audacity (using as a guide
Carla Schroder's excellent Book of
Audacity and a
UCA222 USB audio interface -- audacity doesn't seem able to record
properly from the built-in sound card on any laptop I own, while it
works fine with the Behringer.
Audacity's user interface isn't great for assembly-line recording of
lots of tracks one after the other, especially on a laptop with a
trackpad that doesn't work very well, so I wasn't always as organized
with directory names as I could have been, and I ended up with a mess.
I was periodically backing up the recordings to my desktop, but as I
shifted from everything-in-one-directory to an organized system, the
two directories got out of sync.
To get them back in sync, I needed a way to answer this question:
is every file inside directory A (maybe in some subdirectory of it)
also somewhere under subdirectory B? In other words, can I safely
delete all of A knowing that anything in it is safely stored in B,
even though the directory structures are completely different?
I was hoping for some clever
find | xargs way to do it,
but came up blank. So eventually I used a little zsh loop:
one find to get the list of files to test, then for each of
those, another find inside the target directory, then test
the exit code of find to see if it found the file.
(I'm assuming that if the songname.aup file is there, the songname_data
directory is too.)
for fil in $(find AAA/ -name '*.aup'); do
find BBB -name $fil >/dev/null
if [[ $? != 0 ]]; then
echo $fil is not in BBB
Worked fine. But is there an easier way?
[ 10:36 Dec 28, 2013
More linux/cmdline |
permalink to this entry |
When I wrote recently about my
dinosaur doggerel, I glossed over a minor problem with my final poem:
the rules of
doggerel say that the sixth line (or sometimes the seventh) should
be a single double-dactyl word -- something like "paleontologist"
or "hexasyllabic'ly". I used "dinosaur orchestra" -- two words,
which is cheating.
I don't feel too guilty about that.
If you read the post, you may recall that the verse was the result of
drifting grumpily through an insomniac morning where I would have
preferred to be getting back to sleep. Coming up with anything that
scans at all is probably good enough.
Still, it bugged me, not being able to think of a double-dactylic word
that related somehow to Parasaurolophus. So I vowed that, later that
day when I was up and at the computer, I would attempt to find one and
rewrite the poem accordingly.
I thought that would be fairly straightforward. Not so much. I thought
there would be some utility I could run that would count syllables for
me, then I could run /usr/share/dict/words through it, print
out all the 6-syllable words, and find one that fit. Turns out there
is no such utility.
But Python has a library for everything, doesn't it?
Some searching turned up
which includes some syllable-counting functions.
It apparently uses the hyphenation dictionaries that come with
There's a Debian package for it, python-pyhyphen -- but it doesn't work.
First, it depends on another package, hyphen-en-us, but doesn't
have that dependency encoded in the package, even as a suggested or
recommended package. But even when you install the hyphenated dictionary,
it still doesn't work because it doesn't point to the dictionary in
the place it was installed.
Looks like that problem was reported almost two years ago,
python-pyhyphen: doesn't work out-of-the-box with hyphen-* packages.
There's a fix there that involves editing two files,
Or you can just give up on Debian and
pip install pyhyphen,
which is a lot easier.
But once you get it working, you find that it's terrible.
It was wrong about almost every word I tried.
I hope not too many people are relying on this hyphen-en-us dictionary
for important documents. Its results seemed nearly random, and I
quickly gave up on it for getting a useful list of words around
Just for fun, since my
count syllables web search turned
up quite a few websites claiming that functionality, I tried entering
some of my long test words manually. All of the websites I tried were
wrong more than half the time, and often they were off by more than
two syllables. I don't mind off-by-ones -- I can look at words
claiming 5 and 7 syllables while searching for double dactyls --
but if I have to include 4-syllable words as well, I'll never find
what I'm looking for.
That discouraged me from using another Python suggestion I'd seen, the
nltk (natural language toolkit) package. I've been looking for an
excuse to play with nltk, and some day I will, but for this project
I was looking for a quick approximate solution, and the nltk examples
I found mostly looked like using it would require a bigger time
commitment than I was willing to devote to silly poetry. And if
none of the dedicated syllable-counting websites or dictionaries
got it right, would a big time investment in nltk pay off?
Anyway, by this time I'd wasted more than an hour poking around
various libraries and websites for this silly unimportant problem,
and I decided that with that kind of time investment, I could probably
do better on my own than the official solutions were giving me.
Why not basically just count vowels?
So I whipped up a little script,
that did just that. I gave it a list of vowels, with a few simple rules.
Obviously, you can't just say every vowel is a new syllable -- there
are too many double vowels and silent letters and such. But you can't
say that any run of multiple vowels together counts as one syllable,
because sometimes the vowels do count; and you can't make absolute
rules like "'e' at the end of a word is always silent", because
sometimes it isn't. So I kept both minimum and maximum syllable counts
for each word, and printed both.
And much to my surprise, without much tuning at all my silly little
script immediately much better results than the hyphenation dictionary
or the dedicated websites.
Alas, although it did give me quite a few hexasyllabic words in
/usr/share/dict/words, none of them were useful at all for a program
on Parasaurolophus. What I really needed was a musical term (since
that's what the poem is about). What about a musical dictionary?
I found a list of musical terms on
Glossary of musical terminology, saved it as a local file,
ran a few vim substitutes and turned it into a plain list of words.
That did a little better, and gave me some possible ideas:
But none of them worked out, and by then I'd run out of steam.
I gave up and blogged the poem as originally written, with the
cheating two-word phrase "dinosaur orchestra", and vowed to write
up how to count words in Python -- which I have now done.
Quite noncontrapuntally, and definitely not extemporaneously.
But at least I have a useful little script next time I want to
get an approximate syllable count.
[ 17:51 Dec 11, 2013
More programming |
permalink to this entry |
I wrote a few weeks ago about my difficulties in
for a California health exchange (CoveredCA) plan.
At the time, they said I should be hearing from the insurance company
by the following day. I didn't believe that, of course, and indeed,
it was a little over two weeks before I finally got something in the mail.
What I got in the mail was a letter from CoveredCA saying that we
qualify for coverage for 90 days, but that they want to verify some
First, they need to verify citizenship. Fair enough. They want a birth
certificate, passport, or INS form. No problem.
They they say "We are unable to match the Social Security number you
gave us to our records. Please send us a copy of your Social Security card."
That's a snag. I had a social security card once ... maybe 25
years ago? but I've long since lost it and haven't had any need to
go stand in line to get another one. Do I need to do that now? During
the holiday season along with the thousands of other people in the
But the next part is the real kicker:
We are unable to verify that you do not have health insurance through
your job or a government program.
- If you have insurance, we need a letter from your job or the
deferal/state program. The letter should be on official company or
program letterhead. The letter must state the names of the persons who
qualify for now, the type of coverage that ended, and the date it ended.
If you do not have insurance, please call the Service Center for assistance.
Neither of us is currently working at a regular W-2 job, let alone one
that provides health insurance. So, let me get this straight: it looks
like what CoveredCA is telling us is that we can't get ACA coverage
unless we can prove that we don't currently have employer coverage.
How the heck do you prove that?
Looking at the list of documentation they'll accept,
a letter from each of our nonexistent employers, on nonexistent
company letterhead, would work nicely.
Uploading documents (forget using Firefox)
I went to the website, logged in and clicked on the verification link
at the lower right. (It's a little hard to find given that there's a
bunch of other text on top of the link. Nobody seems to be checking
the website layout.)
After clicking through a few more screens, I ended up at a page where
it listed two items for each of us: Proof of Citizenship, and
Proof of Minimum Essential Coverage.
The citizenship part had a long list of acceptable documents -- much
longer than the list in the letter they had sent me (though nothing
about social security cards, so I'm not clear where that part comes in).
But a passport seemed the easiest thing. So I scanned the photo page
from each of our passports, clicked on the link for proof of
citizenship, clicked Upload, clicked Browse, found the link to the JPG
I'd made of my passport, and clicked Upload.
And I got:
The connection to the server was reset while the page was loading.
I tried again, several more times. I tried making the file smaller
(640x449, 128k), using tif and pdf instead of jpg (following suggestions
I found on the web -- lots of other people are also having this problem).
But it was no use -- I still got the same message every time.
Finally I found a thread where someone had discovered that it didn't
work with Firefox, only with IE and Chrome. So I tried logging in with
Chromium, and sure enough -- the upload worked.
It's sad to see how marginalized Firefox has become, when major sites
like this don't support it.
Minor aside: there's no way to remove an upload once you've made it.
I uploaded both our passports in the space for my documents,
before realizing there was a separate link for his documents.
I hope that doesn't get my application thrown out.
Okay, on to the next part.
Proof of Minimum Essential Coverage
Under the "Proof of Minimum Essential Coverage" category was this
list of documents:
- Notice of Action of discontinuance from Medi-Cal
- Notice of Action of discontinuance from Medicaid
- Confirmation of disenrollment from employer sponsored health insurance plan
- Confirmation of disenrollment from health insurance plan
None of them seem at all relevant to someone who isn't an employee
and therefore isn't covered by insurance.
Well, the letter did say "If you do not have insurance, please call
the Service Center for assistance." So let's try that.
I have trouble finding time when I can stay on the phone for the
30-45 minutes it apparently takes to get through the queue to a live
operator at CoveredCA: I've tried several times, but always got called
away to deal with real-world issues before I got to the head of the queue.
The live chat link didn't do anything for me a few weeks ago, but this time
I got a notice from the pop-up blocker and was able to get the window
to pop up.
The chat window tells you where you are in the queue (I started at
#47) and counts down, along with
wildly varying time estimates of how
long I had left to wait.
After just over half an hour, I'd finally made it to position #1,
and the page changed to say:
There are no agents available to chat with you right now. Please try again later.
The only option was a button labeled
Request email response
. So I clicked it. It took me to this page:
You do not have permission to access this document.
Honestly -- does anybody bother to test any part of this website?
It's been live for two months now, and so much basic functionality
doesn't work at all.
I tried it several more times (the nice thing about chat, as opposed
to phone, is that you can go off and do other things while you're
waiting in the queue), in both Firefox and Chromium,
but got exactly the same results every time. Googling suggests
that lots of other people are seeing the same thing.
Makes me wonder if anyone is getting through ... or are there just a
bunch of employees sitting there at their keyboards at CoveredCA headquarters,
wondering why no one is asking for help via chat.
I really wish they'd offer email assistance. That seems like it should
be a no-brainer, given the long wait times for interactive help either
by phone or (ha!) by the nonexistent chat. But there's no such link on
Well, there is a space for comments in the Verification Request screen.
So I typed in a question about how they want us to prove we're not employed.
At the bottom of the verification page, the button options are
"Close", "Save and Exit", "Withdraw" (greyed out), and "Submit".
I wonder what the difference is between "Save and Exit" and "Submit"?
I crossed my fingers and went for "Submit", and now my verification
status is "Submitted". I guess that's good.
Check your messages
Another thing I learned along the way was that there was another copy of the
letter in my "Secure Mailbox" in the links at the top of the page after
logging in. They apparently don't send any notifications that you
have messages -- I wonder why they bother asking for email address,
if they're not going to use it for anything -- so if you're waiting
for any step of the process, be sure to log in periodically and look
for that "Secure Mailbox" link.
When you do check your messages, they're in PDF!
Not only that, but there's apparently something odd
about their MIME type, because Firefox doesn't display them inline
like other PDFs. They display okay in an external viewer, though.
So I'll be checking messages to find out what happens with the
verification process, wondering whether it will all be finished by
December 15, which is apparently the (unpublished) deadline for
enrolling in a plan if you want it to be active by January 1.
Meanwhile, I'm trying not to think about the ominous coda in the
letter they sent:
It's time to choose a plan. Your coverage starts after you choose a
plan and pay your first premium (monthly cost).
Would that be in addition to the plan I supposedly already chose
two weeks go?
Or did they throw all that away, and I need to go through that step
again when and if they decide my verification is complete?
I wonder how I would know?
Phone to Blue Shield
A friend who's been having similar problems signing up for a plan
suggested I call Blue Shield to see if they'd gotten any signup info
for me. Unfortunately, I got the letter during the Thanksgiving
holiday, so I had to wait until Monday to call Blue Shield, and just
called them today.
I got through after a 15 minute phone wait, and got a very helpful
person who, unfortunately, informed me that they haven't gotten
anything from CoveredCA about my coverage.
After establishing that, yes, CoveredCA still has their usual
30-plus-minute phone wait, he suggested that I put in a request on the
CoveredCA website for them to contact me. I said, What? I'd love that,
but I haven't been able to find any way to get feedback except the
phone number and the non-working live chat link. He said he'd walk me
We both logged in at the same time. He said, "See the tab
in the row across the top that says Resources?" Me: "No, there's no
Resources link. The four tabs at the top say Learn, Preview Plans,
Apply, and Maintain." He continued to insist that I should click on
Resources. I did a Find in Page -- the word Resources only appears
once in the page, as a header down near the bottom right, and under it
are a couple of things like links for where to download a PDF viewer.
Clearly not what he was talking about.
I'm guessing he was logged in as an agent/provider, not as an
individual customer like I was. Anyway, he used the page they offer
to agents to put in my info and a contact request.
I'm not holding my breath.
But just now, after CoveredCA timed out my log-in session and put me
back at the home page (what's the point of the home page, anyway?
You can't even log in -- you have to click on
Start here before they'll give you a Log in link)
I tried clicking on the Contact us link at the bottom ...
and on the page that took me to, there's a
Click here to request information or provide comments link
that I suspect is the same form he filled out for me.
Why they offer the non-working Live Chat link on every page,
but not the Request information link, is another mystery.
(Oh, I think I've figured it out now.
The start page is there because the real site is
at v.calheers.ca.gov, not coveredca.com, and their website designers
don't know how to make a website redirect automatically, so they make
everybody click through an extra button to go to the real site.)
Meanwhile, time is ticking away. Nobody seems to know whether the
deadline to sign up for Jan 1 is actually December 15 or December 23
(the Blue Shield rep wasn't sure either),
but either way, if it takes more than two weeks for CoveredCA to submit
any information to the insurer, it's hard to see how it will be
possible to get signed up by the deadline if anything goes wrong and
needs to be resubmitted.
Fortunately my existing health plan is still active (never mind that
it costs $1000/month more than a subsidized plan). So I'm luckier than
many. My friends whose existing plans have been canceled may end up
with no coverage at all come Jan 1.
Update: success! At least, I think so. On Dec 12, I got an automated
call from Blue Shield saying they'd gotten enrollment info, and giving
me a number to call to make a payment. I paid and got a confirmation
number, and they said I should expect an information packet in the
mail in 5-7 working days. A friend who's been trying to sign up since
Oct 1 when CoveredCA opened got the same Blue Shield call a couple of
days earlier. Then we both got the same automated call a few days
later; we both checked and BS has a record of both our payments, so
the repeated calls are apparently just a glitch.
[ 17:32 Dec 02, 2013
More misc |
permalink to this entry |