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
import serial | |
import time | |
import requests | |
import json | |
firebase_url = 'YOUR_FIREBASE_DB_URL' | |
#Connect to Serial Port for communication | |
ser = serial.Serial('COM15', 9600, timeout=0) | |
#Setup a loop to send Temperature values at fixed intervals | |
#in seconds | |
fixed_interval = 10 |
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
package com.mindstorm.api.quote; | |
import com.google.api.server.spi.config.Api; | |
import com.google.api.server.spi.config.ApiMethod; | |
import com.google.api.server.spi.config.ApiNamespace; | |
import com.google.api.server.spi.response.CollectionResponse; | |
import com.google.api.server.spi.response.NotFoundException; | |
import com.google.appengine.api.datastore.Cursor; | |
import com.google.appengine.api.datastore.QueryResultIterator; | |
import com.googlecode.objectify.ObjectifyService; |
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
<servlet> | |
<servlet-name>SystemServiceServlet</servlet-name> | |
<servlet-class>com.google.api.server.spi.SystemServiceServlet</servlet-class> | |
<init-param> | |
<param-name>services</param-name> | |
<param-value>com.mindstorm.api.quote.MyEndpoint, com.mindstorm.api.quote.QuoteEndpoint</param-value> | |
</init-param> | |
</servlet> | |
<servlet-mapping> | |
<servlet-name>SystemServiceServlet</servlet-name> |
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
runtime: go | |
api_version: go1 | |
handlers: | |
- url: / | |
script: _go_app |
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
package employeelookup | |
import ( | |
"fmt" | |
"net/http" | |
) | |
var employees = map[string]string{ | |
"E1": "Romin Irani, x1000", | |
"E2": "Neil Irani, x1001", |
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
<servlet> | |
<servlet-name>SystemServiceServlet</servlet-name> | |
<servlet-class>com.google.api.server.spi.SystemServiceServlet</servlet-class> | |
<init-param> | |
<param-name>services</param-name> | |
<param-value>com.mindstorm.api.MyEndpoint, com.mindstorm.api.QuoteEndpoint</param-value> | |
</init-param> | |
</servlet> |
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
package com.mindstorm.api; | |
import com.google.api.server.spi.config.Api; | |
import com.google.api.server.spi.config.ApiMethod; | |
import com.google.api.server.spi.config.ApiNamespace; | |
import com.google.api.server.spi.response.CollectionResponse; | |
import com.google.api.server.spi.response.NotFoundException; | |
import com.google.appengine.api.datastore.Cursor; | |
import com.google.appengine.api.datastore.QueryResultIterator; | |
import com.googlecode.objectify.ObjectifyService; |
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
/* | |
Manipulate a text file.Search for 'word' in this text file and replace it with 'inserted word'. Write the contents | |
back into the original file | |
*/ | |
package main | |
import ( | |
"bytes" | |
"fmt" | |
"io/ioutil" |
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
package main | |
import ( | |
"fmt" | |
"log" | |
"os" | |
) | |
func check(e error) { | |
if e != nil { |
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
Exercise 15 : http://play.golang.org/p/0qhgQmSVBR | |
Exercise 16 : http://play.golang.org/p/YYdFELAke8 |