100.00000000 100.63040201 100.67820004 100.75418227 100.80404273 100.88497099 100.97406618 103.08327523 103.23681735 [104.31415152](https://blockchain.info/tx/4e15ce4722
This file contains 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
#!/usr/bin/env python | |
'''Using Webhook and self-signed certificate''' | |
# This file is an annotated example of a webhook based bot for | |
# telegram. It does not do anything useful, other than provide a quick | |
# template for whipping up a testbot. Basically, fill in the CONFIG | |
# section and run it. | |
# Dependencies (use pip to install them): | |
# - python-telegram-bot: https://github.com/leandrotoledo/python-telegram-bot |
- Launch one T2 micro instance, using Ubuntu 14.04 LTS AMI.
- Open SSH and Bitcoin Protocol TCP ports: 22, 8333.
- Attach 40GB EBS (General-Purpose SSD) volume for blockchain storage to /dev/sdf.
The pricing should be ~3$ for the first year (assuming 30GB upload per month). See here for more details.
Slightly disorganized but reasonably complete notes on the algorithms, strategies and optimizations of the Akka Cluster implementation. Could use a lot more links and context etc., but was just written for my own understanding. Might be expanded later.
Links to papers and talks that have inspired the implementation can be found on the 10 last pages of this presentation.
This is the Gossip state representation:
This file contains 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
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/ | |
# generate server.xml with the following command: | |
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes | |
# run as follows: | |
# python simple-https-server.py | |
# then in your browser, visit: | |
# https://localhost:4443 | |
import BaseHTTPServer, SimpleHTTPServer | |
import ssl |
This file contains 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
package com.example.mediaplayersurfaceswitch; | |
import android.app.Activity; | |
import android.content.Intent; | |
import android.media.MediaPlayer; | |
import android.net.Uri; | |
import android.os.Bundle; | |
import android.util.Log; | |
import android.view.SurfaceHolder; | |
import android.view.SurfaceView; |
This file contains 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
import sys | |
import gevent | |
from gevent.monkey import patch_all; patch_all() | |
from gevent import server, event, socket | |
from multiprocessing import Process, current_process, cpu_count | |
""" | |
Simple multiprocess StreamServer that proxies messages between clients. | |
Avoids using a multiprocessing.Event since it blocks on a semaphore. |
##MixedTweets
We will see how to mix 2 twitter searches and push the results to the browser in real time.
First, checkout this mini project
To try it, you need to install Play 2.0
###Controller
This file contains 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
var GCM = require('./gcm'); | |
var gcm = new GCM(<YOUR GOOGLE API KEY>); // https://code.google.com/apis/console | |
// create the message | |
var msg = { | |
registration_ids: [token], // this is the device token (phone) | |
collapse_key: "your_collapse_key", // http://developer.android.com/guide/google/gcm/gcm.html#send-msg | |
time_to_live: 180, // just 30 minutes | |
data: { |
NewerOlder