Monday, May 30, 2016
May 31, 2016 at 12:29AM
Today I Learned: 1) Fruit flies can jump! It's hard to tell if they jump in general, because they move so darned fast, but I watched a bunch of wingless fruit flies today, and they were definitely jumping around between things and off of things. 2) Characters like "µ" can really get you in trouble in Python (by which I mean they'll cause you to throw an error, which I guess isn't *that* bad in the grand scheme of things). Today I learned how to put non-ASCII characters in a Python string -- just put a "u" before the string, like this: u'GFP (µM)'. This causes Python to interpret the string as UTF-8 instead of ASCII, which lets it recognize pretty much any character. ...at least, that's what you do in Python 2. Not sure about 3. 3) Want a convincing starfield for a picture background? Try this -- leave some blank white paper on a table for a while, then scan it (preferably with an old, dusty scanner). You'll get a white field with a bunch of flecks of dust. Invert the image, giving yourself a black image with a bunch of white flecks. Add some blur to make the flecks look more like stars. Voila! Starfield! ImageJ is good for this kind of image manipulation. I hear paint.NET is also pretty good? Thanks to Sarah Seid for teaching me this method.
Labels:
IFTTT,
TodayILearned
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment