This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Anki docker container with fcitx5 IME support. | |
# | |
# Anki version in debian repos is too old, besides it could really benefit | |
# from containerization when using third party addons. | |
# | |
# Prereqs: | |
# * docker or better yet podman | |
# * x11docker | |
# * `apt-get install nxagent xclip` for some features | |
# * `echo software >~/.local/share/Anki2/gldriver6` maybe to fix some rendering issues |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ bazel build ... | |
$ bazel run :greeter_server | |
Listening on :50051 | |
$ bazel run :greeter_client | |
Greeter client received: Hello, you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Minimal tfrecords reader/writer in pure python. | |
# Use either a fast compiled crc32c implementation from `pip install crc32c`: | |
#from crc32c import crc32 as crc32c | |
# Or alternatively a slower pure python crc32c implementation: {{{ | |
CRC32C_TABLE = ( | |
0x00000000, 0xF26B8303, 0xE13B70F7, 0x1350F3F4, 0xC79A971F, 0x35F1141C, | |
0x26A1E7E8, 0xD4CA64EB, 0x8AD958CF, 0x78B2DBCC, 0x6BE22838, 0x9989AB3B, | |
0x4D43CFD0, 0xBF284CD3, 0xAC78BF27, 0x5E133C24, 0x105EC76F, 0xE235446C, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
namespace NStl { | |
template <class _Tp> struct __stlport_class {}; | |
template <class _Tp, class _Allocator> struct _Alloc_traits { | |
typedef typename _Allocator::template rebind<_Tp> _Rebind_type; | |
typedef typename _Rebind_type::other allocator_type; | |
}; | |
template <class _Tp> class allocator : public __stlport_class<allocator<_Tp> > { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace std { } | |
namespace __std_alias = std; | |
namespace NStl { } | |
namespace NStlPriv { | |
using namespace NStl; | |
} | |
namespace stlport = NStl; | |