Code Snippets reStructuredText

Short texts reStructuredText 🧑‍💻 Code snippets reStructuredText ✍️ Reading lists reStructuredText 👀

flatten_call.rst

+————————-+————————————+—————————————————-+ | Benchmark | 2021-10-13_13-38-main-3901c081143e | 2021-10-14_11-40-flatten-all-py-calls-7c0f49824479 | +=========================+====================================+====================================================+ | logging_silent | 222 ns | 200 ns: 1.11x faster | +————————-+————————————+—————————————————-+ | richards | 99.1 ms | 92.5 ms: 1.07x faster | +————————-+————————————+—————————————————-+ | deltablue | 8.48 ms | 8.19 ms: 1.04x faster | +————————-+————————————+—————————————————-+ | unpack_sequence | 80.7 ns | 78.4 ns: 1.03x faster […]

private-python-packages.rst

Installing Private Python Packages ================================== .. warning:: This guide is for :doc:`/commercial/index`. Read the Docs uses :doc:`pip ` to install your Python packages. If you have private dependencies, you can install them from a :ref:`private Git repository ` or a :ref:`private repository manager `. From a Git repository ——————— Pip supports installing packages from a […]

High level leader sync

High level leader sync ====================== .. contents:: Overseer yuck ————- – This type of thing should not even be necessary here, but out of scope. – ShardLeaderElectionContext.java:115 .. code:: java if (zkController.getClusterState().getCollection(collection).getSlice(shardId).getReplicas().size() > 1) { // Clear the leader in clusterstate. We only need to worry about this if there is actually more than one […]

Virsh cheat sheet

Domain Management —————– * List domains: #virsh list –all * Undefine domains: #virst undefine Volume Management —————– * List all volumes in pool ‘default’: #virsh vol-list default * Delete a volume: #virsh vol-delete –pool default virt-10.img Pools —– * List pools: #virsh pool-list Network management —————— * net-autostart network optional –disable * net-list optional –inactive […]

NLTK Tokenization, Tagging, Chunking, Treebank

===================== Sentence Tokenization ===================== >>> from nltk import tokenize >>> para = “Hello. My name is Jacob. Today you’ll be learning NLTK.” >>> sents = tokenize.sent_tokenize(para) >>> sents [‘Hello.’, ‘My name is Jacob.’, “Today you’ll be learning NLTK.”] ================= Word Tokenization ================= >>> sent = tokenize.word_tokenize(sents[2]) >>> sent [‘Today’, ‘you’, “‘ll”, ‘be’, ‘learning’, ‘NLTK’, ‘.’] […]