Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View helambuapps's full-sized avatar

Helambu Apps helambuapps

View GitHub Profile
@helambuapps
helambuapps / sse-flask.py
Created June 10, 2020 10:08
Flask Server Sent Event Sample
import flask
from random import randint
app = flask.Flask(__name__)
box = ""
@app.route('/subscribe')
def subscribe():
def get_subscribtion_message():
global box
@helambuapps
helambuapps / authentication.py
Created January 25, 2015 03:42
WAMP (Web Apps Messaging Protocol) Dynamic Authentication and Authorization example
from autobahn.asyncio.wamp import ApplicationSession
from autobahn.wamp import auth
from autobahn import wamp
import asyncio
# In a real life get this from your application database
USER = 'eddie'
PASSWORD = 'secret1'
@helambuapps
helambuapps / . read first
Last active August 29, 2015 14:12
File Upload from browser using WAMP (Web Apps Messaging Protocol)
Create a folder .crossbar and put the file ".config.yaml" inside it. Unfortunately Github doesn't let me create a folder :(
Run the crossbar router before running app.py and index.html
@helambuapps
helambuapps / designer.html
Last active August 29, 2015 14:09
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../google-map/google-map.html">
<polymer-element name="my-element">