Monday, July 31, 2017

Monday: So much time waiting for jobs and queries to finish.

My power was fine, but it looks like they had some major outage across the street.
And then later, Drawful again.
Small bladder.

Hold on to your butts.
I had odd prompts.



Sunday, July 30, 2017

Sunday: I have a very specific way of eating pancakes.

Go to the pancake place.

Use maple syrup, because the others aren't as good.

Get pog.

Butter all the pancakes while they're still hot.

Only put syrup on the part you plan to eat right then.  Don't pour it all over to make sure things don't get soggy.

Have kalbi, because kalbi is delicious.

Sometimes you can dip, if the syrup ran off the pancakes too fast.

There was a free spot in the gym, so I took it and topped off everyone.

I have no idea why Cloyster showed up outside.  
And then later, Drawful:
I was still on a pancake kick.

Angry tummy.

A wall with arms.  What.

  • People are awful, and all of my favorite comics right now are either written by women, drawn by women, or star women, and sometimes all of the above.
  • A good Spider-Man.
  • Fred Rogers.
  • Art Deco Squirrel.  YES.
  • Ok, but in D&D, only clerics have healing power (outside of wishes, and those are generally not used for healing unless something has gone horribly wrong).  So it's not quite how it's presented here.  If you die, or lose an arm, or have all your insides come out, but then don't, it's because an actual god decided either "I need you to fight more for me", or "I need you to keep my cleric safe", or "I am generally full of love and you being whole is important to me."
  • Sailor Moon.

Saturday, July 29, 2017

Saturday: So I went to get curry.

It sounded good.
Curry is odd, because it seems like every time I get it, it goes from "way too hot" to "cold and not so great" super fast.

Then I did nothing, so I went for a walk, and it also was "way too hot."  I should try and do something productive tomorrow.


  • We should be handling drugs completely differently than we do.
  • What.  I am 100% on board with Pamela being a anti-hero.  That's how she should be written all the time.  She is not crazy like most of Batman's bad guys, so she should have logical storylines.  What isn't ok is Selina dressing up as "Catbird" because a) that's a stupid name; b) that doesn't even make any sense.
  • I was watching Wonder Woman, and realized that Roddy McDowell had been in at least two episodes.  Then I looked it up, and like everybody who was a one-off character shows up in a different episode as a different character.
  • Dog vs cat.

Friday, July 28, 2017

Friday: Grumble grumble at least it's the weekend.



Yeah, no.

Thursday, July 27, 2017

Thursday: The thing I've been fighting for months might actually be done.

I can't tell, because I filled up the disk it lives on, and didn't want to wait on the rsyncs to finish to a less full disk before going home.  I'll figure it out tomorrow.

Today I went to get my eyes checked, but I didn't get glasses.
Apparently my eyes are "basically the same" with "worse astigmatism" and it looks like I need to get "singular value decomposition" lenses.

There's a gym at the doctor's office now.
So I did the team-friendly thing of sticking my Cloyster in the open spot, and then fed everybody until they were full.
But I still got kicked out.


Wednesday, July 26, 2017

Wednesday: Everything needs more and better documentation.

Earlier today, Julie IMed me and said something to effect of, "Drop whatever boring shit you're currently doing, and watch this youtube video."  So I did, and it was reasonably interesting, and showed me that I should rewrite some of my stats programs to use his more efficient standard deviation calculation.

When I got home, I attempted to install the package.  Finally, on the third computer I tried, I was able to get it to install and run.

Too bad it comes up with the wrong answer.

To be fair, this is a particularly difficult case, but it chose to do the split in the wrong dimension.  There's two closely located nearly Gaussian populations.  According to the documentation, you can specify different distributions for each dimension, but I couldn't get that to work, receiving the super helpful error message "ValueError: sample only has 2 dimensions but should have 1 dimensions".  The video suggested that it is able to take data that's partially classified, and use that along with the unclassified data to do better fits, so maybe tomorrow I'll see if I can figure out how to do that.  If I just say "these three are class A, and these three are class B", hopefully it'll get the dimensions correct.


Tuesday, July 25, 2017

Tuesday: that thing where you kind of root for cancer.

It took far longer than I expected to find a the picture I wanted on my blog.

Monday, July 24, 2017

Monday: Ok, but I needed a figure.

I spent a large chunk of the day proofreading a paper (that is much less complete than I thought it would be), and figures 5-12 were all various correlation plots.  Are "correlogram" plots not common (in quotes because google doesn't converge on if that's the right name)?
The NSF data again, which is a terrible data set to use for this, but I needed something.
The idea being that you have N variables, and want to see how they map against each other, so you put them into a big grid so you can see how all the things match against all the other things.  I wrote a quick version years ago, and went with the R version, just because that was reasonably easy to do:

install.packages("corrgram")
library(corrgram)
corrgram(nsf,upper.panel=panel.pts,lower.panel=panel.ellipse,order=TRUE)
png("why.png")

I'm sure there's a snek version as well.  That reminds me that I need to add a "snek bits" tag.


  • My initial guess would have been the kid had been a jerk to the squirrel.  I also would have said that the guy might have cut the video to just show the bite, and maybe he did something before that.  However, putting them both together leads me to the same conclusion as the health department; this isn't a normal squirrel, and it's probably sick.  The only time I've ever been bitten by a squirrel I gained the proportional strength and abilities of a squirrel it was a tiny nibble by a squirrel who was really excited about food, and missed when it tried to get some.
  • Ok, if this had been any other site telling me to "not order a fancy burger," I'd ignore it and put it in the "don't tell me what to do" category.  The problem is, I watch their youtube channel, and just last month, they had a video that was "this is a super fancy burger, and you should totally order it if you can."
  • Also, I'm pretty sure this qualifies as the end state of "don't tell me what to do" in relation to food.
  • I like the raincoat one the best.
  • I couldn't tell what was wrong when I watched the bootleg copy of the trailer, but it's obvious when someone says it.  Thanos looks weird without his hat.
  • Nova and Quasar can both fly, and they're spending their time making horses angry?
  • This has been all over my Twitter timeline.  I don't understand how hard this is for people.  "Well, we'll have to see what the writers come up with!"  Boom.  You've diffused the ship talk you don't want to deal with, and you don't make something that makes the shippers feel bad.
    • In case it isn't clear, I'm talking about the fandom relationship shipping, not the logistics of transporting objects shipping.

Sunday, July 23, 2017

This is an elegant solution?

A = plt.axes()
A.set_yticks(np.arange(0,1.01,0.1))

That's silly.

A = plt.axes()
A.set_yticks(np.linspace(0,1,11))

Oh yes, that's much more obvious of a solution.

Sunday: I don't know.

Mostly I didn't know what I wanted to eat.  I eventually decided to go to Kono's, but then as I was driving, I didn't want to stop, so I just kept going, deciding along the way to do the complement of yesterday's dinner.
I got the super big one, because my plan is to eat part of it for dinner.  My tummy is grumbly, so that's probably going to be right after I finish this post.
Then I stopped at the park there.

According to the calculator, the tide level was about two and a half feet higher than normal.
 That explains why this area that's never flooded was flooded.

Finally, I was reading a book, and it made the claim that if a trait is in 1/200 people, then knowing 200 people means you know somebody with that.  "That doesn't sound quite right," I thought to myself.  This is basically the same binomial distribution problem from earlier, just with the case of looking at N_obs = 0.  So, plotting this up for three different probabilities to see how P_zero changes with the number of trials:
Side note, I do not like how snek handles grids.  You can plot everything using the plot object, but you cannot set the grid spacing.  That's an axis parameter, and you have to create an axis object by creating a subplot in the plot, even if you only want to have one plot.  Why is there this level of obscuration?
Anyway, for the 200 case, knowing 200 people only means there's a ~37% chance of not knowing someone with the trait.  That's pretty large.  Then I thought, "this is just the same curve, scaled along the trials axis, isn't it?
Yep.  This only looks reasonable in the semilog scale.  It'd be nice to have more gridlines, but nope.
So the 50% probability is at like 69% of the (N_trials * Pexp = 1) value.  These are specific values, and there should be some way to say "this is exactly equal to something".  I spent way to long trying to sort it out in terms of a Gaussian approximation to the binomial distribution before realizing that it's actually a Poissonian approximation I should be using.  Whoops.  As N_trials becomes big, the mean goes to N*P, with variance N*P*(1-P).  As P goes to zero, (1-P) goes to unity, and the mean equals the variance, and both are equal to NP.  This becomes the Poissonian lambda, so at the NP = 1 point, the probability of observing zero is just 1 / e.  The 50% point is the inverse CDF, and I don't have an inverse incomplete upper gamma function, but estimating from the gamma function I do have puts the point around 0.69315.  Cool.  Answers that question no one cared about.


  • If they succeed in their repeal, they will bankrupt some people and kill others.  The two sets are not exclusive.
  • I chose the 1/50 above based on this article's estimate of the chance of catching a legendary after the battle, because this is literally the exact same binomial problem popping up today.  2%.  I'm not going to bother with it if the rate is that low.  The comments here sum up my thoughts pretty well.  This isn't worth it.
  • A cat story.
  • Hulk and Valkyrie.

Saturday, July 22, 2017

Saturday: 1e12 easier.

Ages ago, I should have applied for Pre-Check or something, and for at least the past 18 months, Julie has been saying I should get Global Entry, which is basically the same price and also makes international travel easier.  Today I finally completed all the hoops for that.

Although I initially had to schedule my interview in San Francisco, on December 28th, because they are totally random with how they do interview things.  After two reschedules, I was able to get today at 2:15, in Honolulu.  I printed out and brought all the documents and papers and everything that the webpage said, and then checked yelp, because apparently yelp is where the government assumes information on how to get to their offices will be located.  Luckily, Jamila was there to do that, telling me where to drive like it feels like you're not supposed to, and where to park.  I went in, gave my passport to them, waited like two minutes, went in to do the interview that basically was "Are you a criminal?  Do you still live where you said you live." And that was it.  No video (maybe they don't do that anymore?), and by the time I was home I'd received the "yeah, you're in the program" confirmation email.  So hopefully that means not having to bother with the slow airport security crap.

Followed by a celebration burger.
Then, since I was there, Target, and then, since I wasn't there, a long drive back to town via H-3.

Where I was informed by Colby that he'd caught a legendary Pokemon.
Pokemon Go has been broken since this last major update.  Gyms don't turn over as much as they used to here, and it doesn't feel like it's worth bothering unless there's a big group to play with, so you can stomp on the full gym and fill it completely with your team.  This effectively means all gyms are full, and it's a pain to try and do anything about it.

Plus, my Go Plus just doesn't work anymore.  It associates ok (sometimes), but doesn't do anything.  It doesn't notice stops, it doesn't notice Pokemon, it sometimes does the long red buzz of "I'm worthless," sometimes trying it a few times before disassociating again.  This makes going for walks less fun, because instead of being able to pay attention to walking, I have to actively play the game again.

So, when I was returning home, I saw a massive crowd of people at the park down the street.  There's a gym there now.  I started the app up when I got home:
Damn it.
I had to try, I guess.  Besides, there was a huge crowd of people when I drove past.  There was less of a giant crowd when I got there.  I waited until someone said, "who wants to join?" and then joined.  Unfortunately, that was with only like 20s left in the countdown timer, so I had to quickly spend it replacing the worst auto-selected garbage from my team.  I don't think my CP400 Wobbuffet is going to be much help.

And due to the other people, was able to actually beat the raid.
I didn't capture the stupid thing, though, because that would make the game too much actual fun to play.  You have to find a gym, find people to battle with, beat the stupid thing, and then you have a chance to catch it.  Plus, you can't try things again once you beat it.  I don't understand how they could have earned more than a billion dollars, and still not know what they're doing.


  • I mean, JFC.  You plan big catch thing, and you don't schedule additional cell coverage?  Or set up wifi?  Or actually plan how to handle that many people?
  • When I saw this story, I thought, "hey, it's cool that they have a place where people who really like trains can go pretend to run trains.  People should be able to do whatever they think is fun."
  • Then my brain immediately flashed to a meme from late last year of Icarus saying, "I'm going to fuck the Sun," and immediately added "within reason."
  • The sea otter.
  • Dog, we both know that you're technically following the rules, but come on.
Oh, also I got dinner at the place down the street because I could walk there, but it actually probably would have been faster to drive to Hawaii Kai for Jersey Mike's because they're really slow.

Friday, July 21, 2017

Friday: I really wanted tacos.

I didn't get a good look at it, but it was real, and it was great, and everyday should have dogs at work.

And my phone did this crap when I was getting lunch.  Not cool, phone.
That's just further evidence that I should get a new phone, I guess.  It sounds like next week there might be an update of my current phone, which is probably way thinner and faster and all that.

Anyway, back to tacos.  Julie's post yesterday with the taco picture made me really want tacos all day.  So I drove all the way over to Kailua to get tacos for dinner.

I usually get the barbacoa, but I got one regular steak today.  That's actually much better, with a richer flavor that I wanted from the barbacoa.  It's also less messy, as it doesn't have as much juice.
Also I wanted guac, but they put soap weed in their guac, so it's good that I asked beforehand.  Mostly I just really wanted that bacon and avocado taco Julie had.  I want that so much.


  • Julie just asked about this yesterday, and my response was "I saw a thing about spicer, but I think it was a tweet or something.  So maybe? But not officially?  I would not be surprised by them half-assing getting rid of somebody."  He quit, because they kind of half-assed it by surprise hiring a new guy that nobody likes.
  • I love this meme.
  • Squirrel.
  • "Well then, I'm off to Switzerland."

Thursday, July 20, 2017

Thursday: Waking up thinking it's Friday, then realizing it's actually Thursday is a crushing way to wake up.

Followed by many technical things at work just being difficult.
At some point I saw a tweet today that was some variant of "when I see a name in the trends, I always wonder what they did."  I then checked the current trends, and saw this:

And immediately thought, "Damn it, Victor, what did you do now?"
Got a movie, apparently.  ¯\_(ツ)_/¯



Wednesday, July 19, 2017

Wednesday: I don't think it's working, bird.

It's just a feeling.

Tuesday, July 18, 2017

Tuesday: I guess they're painting at the doctor's office?

Of course, I didn't realize this while going in.  "I wonder what they're doing to the floors."  Good job, me.

Monday, July 17, 2017

Sunday, July 16, 2017

Sunday: I have not been productive this weekend.

I just realized I was going to take the trash out today, but I never did.  So I guess that's a tomorrow job.  I think part of the issue is that it's been hot and muggy all weekend, and that makes doing things not fun.

I did get sushi.  It was really empty.


Saturday, July 15, 2017

Saturday: Well,

"Why not go to the Spalding House?"  So I do.  "Huh, why is the parking lot so empty?"  Go inside.  "Sorry, all the art stuff is closed for an exhibition switch.  The less cool outside stuff is still open."  So it's good that it's free when you have a membership.

Outside art stuff.

A tiny lizard friend.  Like super tiny.

Outside stuff.
So now what?
Pizza time.
And then I came home, and instead of going for a walk like I had originally planned, I watched youtube stuff.  Then remembered I could watch tomorrow's episode of the AH Game of Thrones play through, even though I don't really care about GoT.  The only problem of not watching on youtube is that I can't watch at double speed.  So.



Thursday, July 13, 2017

Thursday: Just before I went home, I realized that the hygenist did more actual work than the dentist.

Like, why not just have her do everything?  The dentist was kind of a jerk, and the only real "work" he did was stab me with the scrape-y thing and floss.  "Did she do the floss?" So she sometimes does that too?

And this was pretty much how work went.  Minus the tigers.  I added the tigers for fun.

I was also surprised at how much the Pobs value changes with Pexpect, but looking at the plot, it makes sense.  You have Nobs, and that's fixed, so if Pexpect goes up, that pulls the distribution upward, and the Pobs plummets.

I need to send more postcards.


Wednesday, July 12, 2017

Wednesday: No, it's fun to discover a massive problem with a database just when you want to go home.

But I think I was able to fix it with a redo, and changing all the "INSERT"s to "INSERT IGNORE"s.

And I wanted to make a proper version of the garbage scribble at the top of this post.

I really like the way R plots things.
 It's reasonably simple:

b = data.frame(N = seq(0,177))
b$P = choose(177,b$N) * 0.24**b$N * (1 - 0.24)**(177 - b$N)

L = rbind(c(0,0), subset(b, b$N <= 36),  c(36,0))
U = rbind(c(44,0), subset(b, b$N > 43), c(177,0))

ggplot(b,aes(x = N, y = P, color="P_expect = 0.24")) + \
  geom_polygon(data=L,aes(x = N, y = P, fill="Pobs")) + \
  geom_polygon(data=U,aes(x = N, y = P, fill="Pover")) + \
  geom_line() + geom_point()  + \
  scale_colour_manual(values=c("black"),name="",
                      guide=guide_legend(override.aes=aes(fill=NA))) + \
  scale_fill_manual(values=c("red","blue"),name="")

ggsave("/tmp/2017b.png")

The only major issues are that doing the shading requires constructing a polygon object, and that needs to have endpoints set correctly (or it shades the wrong way).  Getting all the colors and legend set was also not super obvious, and that "override.aes" thing is just nonsense.

"But it's not snek."  So then it was a challenge to see how to do this in snek, too.
Snek is simpler, but their documentation is far worse.  Examples should start slow, not alphabetically with "animation."  Why would you do that?
#!/usr/bin/env python3                                                                                                       
import matplotlib.pyplot as plt
import scipy.special
import numpy as np

P_expect = 0.24
N_talks  = 177
N_obs    = 36
N_expect = 44

N = np.arange(0,N_talks,1)
P = scipy.special.binom(N_talks,N) * P_expect**N * (1 - P_expect)**(N_talks - N)

# Lower portion
Nl = np.arange(0,N_obs,1)
Pl = scipy.special.binom(N_talks,Nl) * P_expect**Nl * (1 - P_expect)**(N_talks - Nl)
Zl = Nl * 0.0

# Upper portion
Nu = np.arange(N_expect,N_talks,1)
Pu = scipy.special.binom(N_talks,Nu) * P_expect**Nu * (1 - P_expect)**(N_talks - Nu)
Zu = Nu * 0.0

plt.grid()
label_text = "P_expect = %.2f" % P_expect
plt.fill_between(Nl,y1=Zl,y2=Pl,color="red",label="P_obs")
plt.fill_between(Nu,y1=Zu,y2=Pu,color="blue",label="P_over")
plt.plot(N,P,color="black",label=label_text)
plt.scatter(N,P,s=5,color="black")
plt.legend()
plt.savefig("mpl.png")

Having an explicit fill_between() function saved a lot of time.  The legend() function was also helpful for making it just work.

I'm still behind on my RSS stuff.

  • "Oh no!  This new Spider-Man movie confuses the timeline!"  I complain about stupid stuff, but this is too far.  Comic book timelines have been insane forever.  I mean, look at Squirrel Girl.  Doreen was 14 when she defeated Doom with Tony, then she did stuff for a few years with the GLA, then she was kind in the Avengers, then she babysat Luke Cage/Jessica Jones' daughter, and now she's in college.  How old is she?  Why isn't she 39 if the comics follow regular time?  Doesn't matter, she's doing college now, enjoy your wonderful stories.  Comic book time is meaningless.
  • Wonder Woman.
  • Whoops.
  • Best Spider-Man.
  • Buffalo.

Tuesday, July 11, 2017

Tuesday: My back hurts.

And I didn't have a chance to read all my internet today.  I did decide that since the company I use for domain name crap seems broken, I should just buy a domain name and use a proper service.  Googling that problem had Google tell me that Google does that.  Fine.  Done and done.  It doesn't look like the DNS update has propagated, but Googling that suggest it can take up to 24 hours.  Then I'll be able to easily read my internet while waiting for lunch again.  Woo.

Today's picture is the binomial distribution stuff that I took a picture of with my Google powered phone, from a company that was owned by Google when I bought it, sent via Google chat, and then uploaded to Google photos so I could use it on my Google blog.
The point is that a lot of the time, I just want crap to work, and Team G is pretty good at doing that.