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
{ | |
"status": 200, | |
"likelihood": 0.88, | |
"requestId": "6b54dea7-0d45-4a2c-ab5d-3f749e90e2ae", | |
"photos": [ | |
{ | |
"url": "https://d2ojpxxtu63wzl.cloudfront.net/static/b19643dab35a1ac80271a6e80b960be4_0276f6bcee191441f6cc640002bede2e9f28a87191bffb5477096758bf746d1e", | |
"type": "facebook", |
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
# -*- coding: utf-8 -*- | |
'''recorder.py | |
Provides WAV recording functionality via two approaches: | |
Blocking mode (record for a set duration): | |
>>> rec = Recorder(channels=2) | |
>>> with rec.open('blocking.wav', 'wb') as recfile: | |
... recfile.record(duration=5.0) | |
Non-blocking mode (start and stop recording): |
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
<?php | |
class ServiceHelper { | |
// @text is the full tweet text | |
// @shortCode is the code part of the shortlink, like nXXX0 | |
public function shortenForTwitter($text, $shortCode=FALSE, $shortDomain=FALSE) { | |
$placeholders = array(); | |
$rawTweet = $text; |