Skip to content

Instantly share code, notes, and snippets.

Avi Lior avilior

Block or report user

Report or block avilior

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@avilior
avilior / main_asyncio.py
Created Dec 9, 2019
Basic asyncio base template with python 3.8
View main_asyncio.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import asyncio
import logging
import uvloop
from kafka_producer import KafkaProducer
from kafka_consumer import KafkaConsumer
LOG=logging.getLogger(__name__)
@avilior
avilior / docker-compose.yml
Created Dec 9, 2019
Get Kafka/Zookeeper Bitnami working with Docker For MAC
View docker-compose.yml
version: '3.7'
networks:
kafka-net:
driver: bridge
services:
zookeeper:
image: 'bitnami/zookeeper:latest'
View vose_vose_alias.py
import random
import functools
"""
Reference: http://www.keithschwarz.com/darts-dice-coins/
Initialization:
1 Create arrays Alias and Prob, each of size n.
2 Create two worklists, Small and Large.
View python2main.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import argparse
import logging
import sys
logger = logging.getLogger(__name__)
You can’t perform that action at this time.