NOTE: This is a question I found on StackOverflow which I’ve archived here, because the answer is so effing phenomenal.
If you are not into long explanations, see [Paolo Bergantino’s answer][2].
NOTE: This is a question I found on StackOverflow which I’ve archived here, because the answer is so effing phenomenal.
If you are not into long explanations, see [Paolo Bergantino’s answer][2].
As of IPython 5, readline
is no longer used to interpret keystrokes.
Instead, the pure-python library prompt_toolkit
is used.
Getting vim mode in IPython is straightforward. First, edit
~/.ipython/profile_default/ipython_config.py
and add the following line:
c.TerminalInteractiveShell.editing_mode = 'vi'
Note: "Forked" from Latency Numbers Every Programmer Should Know
Event | Nanoseconds | Microseconds | Milliseconds | Comparison |
---|---|---|---|---|
L1 cache reference | 0.5 | - | - | - |
Branch mispredict | 5.0 | - | - | - |
L2 cache reference | 7.0 | - | - | 14x L1 cache |
Mutex lock/unlock | 25.0 | - | - | - |
For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.
After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft
import time | |
import sys | |
class ProgressBarPrinter: | |
def __init__(self, width, step, stream, fname): | |
self.width = width | |
self.block_progress = 0 | |
self.current_progress = 0 | |
self.start_time = time.time() |
"""Pseudocode description of the AlphaZero algorithm.""" | |
from __future__ import google_type_annotations | |
from __future__ import division | |
import math | |
import numpy | |
import tensorflow as tf | |
from typing import List |
Don't do the crime, if you can't do the time.
-- Anthony Vincenzo "Tony" Baretta
Vim is an amazing text editor. I love it. Really, I wouldn't [organize][organize] a Vim advent calendar if I didn't. But, as amazing as it is, Vim is not for everyone. It can't solve all your problems, or be a TUI version of your favorite IDE, or make you a better programmer, or land you that dream job in the Bay Area. But Vim can help you be more mindful, focused, and efficient, as long as you approach it with the right mindset.
Don't get me wrong, I certainly welcome you to try Vim, but I'm not a proselyte. I don't thrive on newbies. I just want you to use the right tool for the job and not waste your—and anyone's—time on a fruitless quest.
Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.
Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill
) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.
The Wayland project seems to operate like they were starting a greenfield project, whereas at the same time they try to position Wayland as "the X11 successor", which would clearly require a lot of thought about not breaking, or at least providing a smooth upgrade path for, existing software.
In fact, it is merely an incompatible alternative, and not e