- Template metaprogramming is still evil, and C++11/14 hasn't fixed anything about it. People argue metaprogramming enables "clean, elegant code," as if a home built on a garbage dump won't smell like garbage. If anyone else needs to repair or extend the foundation of your home they'll need to parse through your garbage pile to make changes. Template metaprogramming as a rule should simply never be done outside low-level libraries.
- auto is too easy to abuse. Oh but, "the IDE makes auto easier to read!" Go back to Java. auto does have a few good uses, clang-tidy provides excellent guidance on where its effective, its guidance should be followed.
- Large lambdas harm readability. They make the control flow of the program harder to parse and discourage self documenting code. Lambdas should be limited to 2-3 statements. And please, if you write a lambda, mean it: don't write a lambda where you could have just as easily written a standalone function.
- Pat dry your brisket.
- Trim some fat off, but leave at least 1/4" fat where you can. The fat makes a good moisture insulator. Or don't. A dry crust tastes great too! For this experiment I trimmed the fat off one half of mine and left the fat on the other half; I liked both!
- Make a dry rub of 2 parts rock salt to about 1 part ground black pepper. Eyeball it. Rub it into the meat and let the brisket sit out for an hour.
- Set your smoker to 150°F and wait for it to stabilize at 150.
- Place the brisket in the smoker and cook for at least 1 hour per pound.
- DO NOT OPEN YOUR SMOKER. "If you're looking, you're not cooking." Go look at something else: Look up at the sky, your significant other, whatever. There's plenty of interesting things to look at. Don't risk fiddling with the internal temp of your smoker.
- Shut the smoker off, wrap in foil and let rest for 60+ minutes before serving.
- Pre-heat your broiler to 500°F.
- Pre-heat your omelet pan to about 275°F (medium).
- Sauté your diced veggies (onion, bell pepper, etc.) in a little oil until desired texture. (If you're making a batch of omelets you may want to do this ahead of time).
- Add your meats (bacon, ham, sausage, etc.) and sauté for another minute. Shake pan to make sure nothing is sticking--if its sticking add a little more oil.
- Whip 2 eggs with a splash of water until frothy and pour over sautéd meats and veggies.
- Cook for one minute on stove (should be bubbling very slowly).
- Move pan to oven and place under broiler for 1-2 minutes.
- Watch omelet carefully, remove from oven when sides begin to curl up and top is a very light golden brown.
- Flip omelet over and place pan back on hob.
- Add shredded cheese to one side of omelet and fold omelet over. Cook for another 30 seconds.
- Flip folded omelet again and place back on hob for another 30 seconds.
import matplotlib.pyplot as plt from matplotlib import animation from IPython.display import display, HTML def plot_movie_mp4(image_array): dpi = 72.0 xpixels, ypixels = image_array.shape, image_array.shape fig = plt.figure(figsize=(ypixels/dpi, xpixels/dpi), dpi=dpi) im = plt.figimage(image_array) def animate(i): im.set_array(image_array[i]) return (im,) anim = animation.FuncAnimation(fig, animate, frames=len(image_array)) display(HTML(anim.to_html5_video()))However there's a disadvantage with this method: You have no control over the encoding settings so you're likely to get a video with a lot of artifacts.
from JSAnimation import IPython_display def plot_movie_js(image_array): dpi = 72.0 xpixels, ypixels = image_array.shape, image_array.shape fig = plt.figure(figsize=(ypixels/dpi, xpixels/dpi), dpi=dpi) im = plt.figimage(image_array) def animate(i): im.set_array(image_array[i]) return (im,) anim = animation.FuncAnimation(fig, animate, frames=len(image_array)) display(IPython_display.display_animation(anim))
16.04 uses gcc 5.4 by default. You'll need to install gcc 4.9 and configure OpenCV to use 4.9 instead:
sudo apt-get install g++-4.9 cmake -DCMAKE_C_COMPILER=/usr/bin/gcc-4.9 -DCMAKE_CXX_COMPILER=/usr/bin/g++-4.9 .
If you have CUDA installed you may want to disable compiling the CUDA libraries as well, or else suffer another hour+ of compilation time. Add -DWITH_CUDA=OFF to disable CUDA.
- 1.5-2 lb pork loin (cut into 1" sections) or pork chops
- 1 cup soy sauce
- 1" fresh ginger, sliced
- 5-10 cloves fresh garlic
- 1/2 lb fresh mushrooms
- 1 lb baby bok choy
- 2 things of dry ramen noodles
$ docker run -it -p 8888:8888 gcr.io/tensorflow/tensorflow:latest-gpu
$ sudo apt-get install nvidia-cuda-dev nvidia-cuda-toolkit
- Who's on this list?
- What is this list for?
- Who should be on this list?
- Should I be on this list?
- Can you add me to this list?
- What should we name this list?
- Who do I talk to create this list?
- How do I add someone to this list?
- Can I get permission to add someone to this list?
- Who has permission to add someone to this list?
- Don't create mailing lists for small groups. I think a good rule of thumb is about 10 people starts to warrant a mailing list. Anything less than that and you can remember their names. If you can't remember their names then don't bother them with an email!
- Let anyone join your mailing lists. Don't do "ask to join" or keep the mailing list a secret. If you're tempted to share secret stuff on a mailing list you probably should be mailing people directly anyways.
- Let anyone read your mailing lists. Maintain a public, searchable archive for all of your mailing lists. If your IT administrator complains tell them it's the 90's--web indexes for mailing lists have been in existence since the beginning of the web.
Not much exists on MacOS X for CAN monitoring, but I was still curious if I could access my car through my Mac. The System Information app told me the OBDLink SX had the vendor ID for Future Technology Devices International, a manufacturer of popular USB<->Serial bridges like the ones in the Beaglebone Black. Once I had that established it was just a matter of guessing the baud rate to see what was connected to it, and a few minutes later I discovered the OBDLink SX is actually the common ELM327 OBD to RS232 Interpreter, for which a great deal of software already exists.
So here's how you can chat with the OBDLink SX USB on MacOS X:
- Connect the OBDLink and check if the device appears at /dev/tty.usbserial-000012FD. The Console will also say FTDIUSBSerialDriver: start - ok. If you don't see the device or this message then you may need to install the FTDI USB kext from here or here.
- Open a screen session 115200 baud, 8 bits, no stop bits, parity.
- Type ATZ <enter> to reset the device, at which point you can chat with it.
- If you want to be able to see what it's saying back send the ATL1 command to enable line feeds.
$ screen /dev/tty.usbserial-000012FD 115200,cs8,-cstopb,parity > ATZ ELM327 v1.3a > ATL1 OK >AT@1 SCANTOOL.NET LLC