Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 -*- | |
import random | |
import logging | |
import requests | |
import re | |
from ask_sdk.standard import StandardSkillBuilder | |
from ask_sdk_core.utils import is_request_type, is_intent_name | |
from ask_sdk_core.handler_input import HandlerInput |
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
def cleanup_airplane_model(raw_model): | |
if "707" in raw_model: | |
return "Boeing <sub alias='Seven Oh Seven'>707</sub>" | |
elif "717" in raw_model: | |
return "Boeing <sub alias='Seven One Seven'>717</sub>" | |
elif "727" in raw_model: | |
return "Boeing <sub alias='Seven Two Seven'>727</sub>" | |
elif "737" in raw_model: | |
return "Boeing <sub alias='Seven Three Seven'>737</sub>" | |
elif "747" in raw_model: |
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
HTTP/1.1 200 OK | |
Content-Encoding: deflate | |
Content-Type: application/json | |
Server: Corethree Core Engine | |
Content-Length: 2898 | |
Connection: keep-alive | |
{ | |
"Type": "Node", | |
"ID": "DKIeiyWaCle", |
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
from twitter import * | |
from fpdf import FPDF | |
import urllib | |
pdf=FPDF('L', 'mm', 'A4') | |
pdf.add_font('DejaVu','','DejaVuSans.ttf',uni=True) | |
t = Twitter( | |
auth=OAuth("xxx", | |
"xxx", | |
"xxx", |
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
unsigned long getNtpTime() { | |
unsigned long timeFromNTP; | |
const unsigned long seventy_years = 2208988800UL; | |
ether.ntpRequest(ntpServer, ntpMyPort); | |
Serial.println("NTP request sent"); | |
while(true) { | |
word length = ether.packetReceive(); | |
ether.packetLoop(length); | |
if(length > 0 && ether.ntpProcessAnswer(&timeFromNTP,ntpMyPort)) { |