Skip to content

Instantly share code, notes, and snippets.

View dpnkrg's full-sized avatar
🏠
Working from home

Deepankar Gupta dpnkrg

🏠
Working from home
View GitHub Profile
@dpnkrg
dpnkrg / pub_sub_redis.py
Created October 30, 2018 12:23 — forked from bamthomas/pub_sub_redis.py
Pub/Sub redis python
from multiprocessing.process import Process
import time
import redis
def pub(myredis):
for n in range(10):
myredis.publish('channel','blah %d' % n)
time.sleep(5)
def sub(myredis, name):
@dpnkrg
dpnkrg / file
Created September 19, 2018 10:46
"""
This is an initial implementation of ReadSerial.
This version is directly implemented from github project.
Implemented as per initial requirements.
TODO :- TESTING
Working : -
1. Advanced version from Serial_v.0.1
1. File name is generated with current date time stamp.
import os
from flask import Flask
from flask.ext.mysql import MySQL
app = Flask(__name__)
mysql = MySQL()
mysql_database_host = 'MYSQL_DATABASE_HOST' in os.environ and os.environ['MYSQL_DATABASE_HOST'] or 'localhost'
# MySQL configurations