Skip to content

Instantly share code, notes, and snippets.

@ismith
ismith / keybase.md
Created November 15, 2016 00:51
keybase.md

Keybase proof

I hereby claim:

  • I am ismith on github.
  • I am ismith (https://keybase.io/ismith) on keybase.
  • I have a public key whose fingerprint is B0EB 32F7 80AF 03FF 4E70 0673 0FE4 0AD7 1399 334F

To claim this, I am signing this object:

Problem Description

Reddit.com has a tree presentation for the posts. For example:

https://www.reddit.com/r/programming/comments/2szuc2/creating_a_doomstyle_3d_engine_in_c_code_walk_and/

The topic has more than 200 posts, and it shows the "top 200 comments". The tree layout shows the comments about the topic, and context association.

Problem

Given an array of words and a width maxWidth, format the text such that it reads right-to-left, and each line has exactly maxWidth characters and is fully (left and right) justified.

You should pack your words in a greedy approach; that is, pack as many words as you can in each line. Pad extra spaces represented as '_' when necessary so that each line has exactly maxWidth characters.

Extra spaces between words should be distributed as evenly as possible. If the number of spaces on a line do not divide evenly between words, the empty slots on the right will be assigned more spaces than the slots on the left.

For the last line of text, it should be right justified and no extra space is inserted between words.

Note:

FORM_OPEN_DATE = "2014-12-20 08:00";
FORM_CLOSE_DATE = "2014-12-25 23:30";
RESPONSE_COUNT = "";
/* Web tutorial: http://labnol.org/?p=20707 */
/* Initialize the form, setup time based triggers */
function Initialize() {
deleteTriggers_();

Robert Weitbrech - and I had to look up his name, though I know the story - is the reason we have, or had (it is a largely obsolete technology now), TTYs in the deaf community.

The exact details of his invention are not known to me, but he took existing teletypewriter technology and brought it into use by deaf people as a means of text communication. ("Not known to me" - teletypewriters existed in some form for use in radio and telegraph comms, but weren't used by deaf people; Weitbrech also developed an innovative acoustic coupler so you could drop a phone handset onto your TTY.)

There's two pieces of this that interest me in a disability+tech context.

One is that this is a collapse of the unfortunate dichotomy of producer vs consumer. I think this is a dichotomy that is resisted in a number of cultures and contexts Project Alloy has ties to - maker culture, hacker culture, FOSS - but there is also a uniquely disability angle to it, in which disabled people are often fram

@ismith
ismith / cc.png
Last active January 19, 2021 23:43
Dark's caption embedding script
cc.png
from django import template
from django.template.defaultfilters import stringfilter
from django.db.models import Q, Exists, OuterRef
from django.utils.safestring import mark_safe
from ..models import Submission, Review
import re
replacements = [
("University of Michigan", "school"),

This is extremely Linux only due to the dependency on v4l2loopback and obs-v4l2sink, though, as mentioned below, CatxFish has also written a similar plugin for Windows. I have not tried it, YMMV.

What is this?

Wanna composite your face (as a video, from your webcam), on top of a video of your choosing, and use that for your conference calls? NOW YOU CAN! (Zoom only supports still-image virtual backgrounds. BOO.)

Note: you will need a greenscreen for this. (You can try all the software-y bits below without one, but it won't look very good at all.) $60 on Amazon, you can probably find one cheaper. (Or make. Or, honestly, it might work if you