Keybase proof
I hereby claim:
- I am kadnan on github.
- I am kadnan (https://keybase.io/kadnan) on keybase.
- I have a public key ASAHNs8LV2Ck6XIFQPi-XKiD1amTKsrvPY8RTrvsBr13lwo
To claim this, I am signing this object:
version: '2' | |
services: | |
cas1: | |
container_name: cas1 | |
image: cassandra:latest | |
volumes: | |
- /Development/PetProjects/CassandraTut/data/node1:/var/lib/cassandra/data | |
ports: | |
- 9042:9042 |
I hereby claim:
To claim this, I am signing this object:
import requests | |
from bs4 import BeautifulSoup | |
from python_anticaptcha import NoCaptchaTaskProxylessTask, AnticaptchaClient | |
def get_token(s_key): | |
client = AnticaptchaClient(api_key) | |
task = NoCaptchaTaskProxylessTask(website_url=url, | |
website_key=s_key.strip()) | |
job = client.createTask(task) |
import json | |
from time import sleep | |
from kafka import KafkaConsumer | |
if __name__ == '__main__': | |
parsed_topic_name = 'parsed_recipes' | |
# Notify if a recipe has more than 200 calories | |
calories_threshold = 200 |
import json | |
from time import sleep | |
from bs4 import BeautifulSoup | |
from kafka import KafkaConsumer, KafkaProducer | |
def publish_message(producer_instance, topic_name, key, value): | |
try: | |
key_bytes = bytes(key, encoding='utf-8') |
def fetch_raw(recipe_url): | |
html = None | |
print('Processing..{}'.format(recipe_url)) | |
try: | |
r = requests.get(recipe_url, headers=headers) | |
if r.status_code == 200: | |
html = r.text | |
except Exception as ex: | |
print('Exception while accessing raw html') | |
print(str(ex)) |
def publish_message(producer_instance, topic_name, key, value): | |
try: | |
key_bytes = bytes(key, encoding='utf-8') | |
value_bytes = bytes(value, encoding='utf-8') | |
producer_instance.send(topic_name, key=key_bytes, value=value_bytes) | |
producer_instance.flush() | |
print('Message published successfully.') | |
except Exception as ex: | |
print('Exception in publishing message') | |
print(str(ex)) |
from fabric.api import * | |
from fabric.colors import red, green | |
from time import sleep | |
from pprint import pprint | |
from fabric.contrib.files import exists | |
def local_git(): | |
is_done = True |