A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
| # Text Classification with Perceptron | |
| # Dataset: Review polarity - Cornell University | |
| # Author: Giorgos Myrianthous | |
| # February, 2017 | |
| import sys, os, random | |
| import numpy as np | |
| # np.set_printoptions(threshold=np.inf) | |
| from collections import Counter |
| bin/kafka-console-consumer.sh \ | |
| --bootstrap-server localhost:9092 \ | |
| --topic testTopic \ | |
| --from-beginning \ | |
| --max-messages 10 |
| # Debian | |
| $ apt-get install kafkacat | |
| # OSX - homebrew | |
| $ brew install kafkacat |
| $ kafka/bin/kafka-console-consumer.sh | |
| Option Description | |
| ------ ----------- | |
| --blacklist <String: blacklist> Blacklist of topics to exclude from | |
| consumption. | |
| --bootstrap-server <String: server to REQUIRED (unless old consumer is | |
| connect to> used): The server to connect to. | |
| --consumer-property <String: A mechanism to pass user-defined | |
| consumer_prop> properties in the form key=value to |
| bin/kafka-console-consumer.sh \ | |
| --bootstrap-server localhost:9092 \ | |
| --topic test \ | |
| --max-messages 10 |
| bin/kafka-console-consumer.sh \ | |
| --bootstrap-server localhost:9092 \ | |
| --topic test \ | |
| --from-beginning |
| kafkacat \ | |
| -C \ | |
| -b localhost:9092 \ | |
| -t testTopic \ | |
| -o beginning |
| kafkacat \ | |
| -C \ | |
| -b localhost:9092 \ | |
| -t testTopic \ | |
| -o beginning \ | |
| -c 10 |
| kafkacat \ | |
| -C \ | |
| -b localhost:9092 \ | |
| -t testTopic \ | |
| -c 10 |