{ python }

  • Generating Identicons by Python


    If a github’s user has not upload an avatar, github will use gvatar or generate an image basing on the email(gvatar also offers this service).This kind of image called identicon.

    This code does the similar thing in a simple way,using the md5 of a string to generate an identicon.

    #英语渣表示写这段话好吃力啊= =


    input: hello world


  • C++ Has Become More Pythonic




    C++ has changed a lot in recent years. The last two revisions, C++11 and C++14, introduce so many new features that, in the words of Bjarne Stroustrup, “It feels like a new language.”

    It’s true. Modern C++ lends itself to a whole new style of programming – and I couldn’t help noticing it has more of a Python flavor. Ranged-based for loops, type deduction, vector and map initializers, lambda expressions. The more you explore modern C++, the more you find Python’s fingerprints all over it.