crontab -e
sudo service cron start
| # This is the settings file | |
| # Rabbitmq configuration | |
| BROKER_URL = "amqp://abcd:abcd@localhost:5672/abcd" | |
| # Celery configuration | |
| CELERY_ACCEPT_CONTENT = ['json'] | |
| CELERY_TASK_SERIALIZER = 'json' | |
| CELERY_RESULT_SERIALIZER = 'json' | |
| CELERY_TIMEZONE = 'Asia/Kolkata' | |
| CELERY_RESULT_BACKEND = 'djcelery.backends.database:DatabaseBackend' |
| stage { "pre": before => Stage["main"] } | |
| class python { | |
| package { | |
| "build-essential": ensure => latest; | |
| "python": ensure => "2.6.6-2ubuntu1"; | |
| "python-dev": ensure => "2.6.6-2ubuntu1"; | |
| "python-setuptools": ensure => "latest"; | |
| } | |
| exec { "easy_install pip": | |
| path => "/usr/local/bin:/usr/bin:/bin", |
ElasticSearch: https://www.mediafire.com/?2o1y58vilz32st4
Kibana: http://www.mediafire.com/?11undfyc3dtkea9/
Extract both of these tools , now go into
for elasticsearch
| /* Useful celery config. | |
| app = Celery('tasks', | |
| broker='redis://localhost:6379', | |
| backend='redis://localhost:6379') | |
| app.conf.update( | |
| CELERY_TASK_RESULT_EXPIRES=3600, | |
| CELERY_QUEUES=( | |
| Queue('default', routing_key='tasks.#'), |
| PROJECT_TOKEN = "<mixpanel-project-token>" | |
| API_SECRET = "<mixpanel-project-api-secret>" | |
| #from mixpanel import Mixpanel | |
| #mp = Mixpanel(PROJECT_TOKEN) | |
| #dir(mp) | |
| ''' people export''' | |
| import base64 | |
| import csv |
| #! /usr/bin/env python | |
| # | |
| # Mixpanel, Inc. -- http://mixpanel.com/ | |
| # | |
| # Python API client library to consume mixpanel.com analytics data. | |
| # | |
| # Copyright 2010-2013 Mixpanel, Inc | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. |
| #! /usr/bin/env python | |
| # | |
| # Mixpanel, Inc. -- http://mixpanel.com/ | |
| # | |
| # Python API client library to consume mixpanel.com analytics data. | |
| import hashlib | |
| import urllib | |
| import time | |
| try: |
| #! /usr/bin/env python | |
| # | |
| # Mixpanel, Inc. -- http://mixpanel.com/ | |
| # | |
| # Python API client library to consume mixpanel.com analytics data. | |
| import hashlib | |
| import time | |
| import urllib #for url encoding | |
| import urllib2 #for sending requests |
| #!/usr/bin/python | |
| import time, argparse | |
| def convert(ctx): | |
| inputstr = str(ctx.Epoch) | |
| if len(inputstr) > 10: | |
| secs = inputstr[:10] | |
| msecs = inputstr[10:] |