This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # An example of using SQLAlchemy / PSQL for PubSub with asyncio | |
| # Rather than using `select.select` to watch for messages, we use | |
| # `loop.add_reader`. | |
| # Inspired by: https://gist.github.com/dtheodor/3862093af36a1aeb8104 | |
| # | |
| # One example of use is with aiopyramid. | |
| # | |
| # For an additional consideration, read about case folding here: | |
| # http://stackoverflow.com/a/5173993/465164 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| </head> | |
| <body> | |
| <img alt="" src="data:image/gif;base64,R0lGODlhMQAwAPcAAAAAAAcHABUVACEhADQ0AEREREZGAElJAElJSUpKLUxMME5OOE9PM1NTN1RUAFRUVFhYAFhYPFlZIVlZWV1dQF9fCmFhAGNjY2RkD2lpAGlpTGpqFWpqamtrM3FxHHNzAHNzc3R0O3d3Inh4I3p6AH19KH19fX5+Pn9/P4CAaoKCgoODAIODLoyMAIyMN4yMjJGRPJWVAJWVJJWVlZmZAJmZKJ6enqGhTKSkAKWlpaamNKysAKysH6+vr7a2ALa2tre3Kry8ALy8Lr29vcTEGsXFxcbGAMfHOc/PAM/PJc/Pz9DQQ9TUKtbW1tnZAN3dFt3dM9/fAN/f3+PjOebmAObmIubm5u3tJu/vAO/v7/b2E/b2MPb29vj4APz8Gf7+AP7+/gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from collections import defaultdict | |
| import freeswitch | |
| sound_path_prefix = "/usr/local/freeswitch/sounds/custom/" | |
| def text_to_digit(text, len): | |
| """Map text to digits""" | |
| atoi_d = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class TasksController < ApplicationController | |
| # GET /tasks | |
| # GET /tasks.xml | |
| def index | |
| @tasks = Task.all | |
| respond_to do |format| | |
| tasks = @tasks.map {|task| json_for_task(task) } | |
| format.json { render :json => { :content => tasks } } | |
| format.html |
NewerOlder