Intents you define and upload to Amazon
{
"intents": [
{
"intent": "GetVolume",
"slots": [
{
"name": "Room",
import UIKit | |
typealias Session = (NSDate, [Int]) | |
let data = [ | |
["created": NSDate(timeIntervalSince1970: 1422600001), "reps": 0], | |
["created": NSDate(timeIntervalSince1970: 1422600002), "reps": 1], | |
["created": NSDate(timeIntervalSince1970: 1422600003), "reps": 1], | |
["created": NSDate(timeIntervalSince1970: 1422700000), "reps": 0], | |
["created": NSDate(timeIntervalSince1970: 1422700000), "reps": 0], |
enum HTTPRouter: URLRequestConvertible { | |
static let baseURL = "http://YOUR_HOST_URL" | |
case Upload(field: String, filename: String, mimeType: String, data: NSData) | |
var method: Alamofire.Method { | |
switch self { | |
case Upload: | |
return .POST | |
} |
import ( | |
"bytes" | |
"encoding/json" | |
) | |
// ToModel converts a string map to a given model | |
func ToModel(obj map[string]string, model interface{}) error { | |
j, _ := json.Marshal(obj) | |
d := json.NewDecoder(bytes.NewReader(j)) | |
return d.Decode(model) |
Intents you define and upload to Amazon
{
"intents": [
{
"intent": "GetVolume",
"slots": [
{
"name": "Room",
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>items</key> | |
<array> | |
<dict> | |
<key>assets</key> | |
<array> | |
<dict> |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
/* | |
* Widget Maker | |
* | |
* <script type="text/javascript"> | |
* var widget = { | |
* "id": "readernaut_widget", | |
* "width": 300, | |
* "height": 300 | |
* }; | |
* </script> |
from django.template import Library | |
from django.template.defaultfilters import lower | |
register = Library() | |
@register.filter | |
def gt(value, arg): | |
"Returns a boolean of whether the value is greater than the argument" | |
return value > int(arg) | |
object_list = [] | |
for note in object_list: | |
obj = { | |
'id': note.pk, | |
'note': note.note, | |
'note.reader_book': { | |
'id': note.reader_book.id, | |
'title': note.reader_book.title, | |
'subtitle': note.reader_book.subtitle, | |
'authors': ", ".join(["%s" % a.get_full_name for a in note.reader_book.authors.all()]), |