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
#define SMTP_SERVER "Your Eamil SMTP server" | |
#define SMTP_USER_BASE64 "Your User Name(Email address) with Base64" | |
#define SMTP_PASS_BASE64 "Your Password with Base64" | |
#define SMTP_FROM_EMAIL "Your Email address" | |
#define SMTP_TO_EMAIL "Target Email address you want to send to" | |
#define SMTP_SUBJECT "Door notification" | |
#include "application.h" |
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
wget -c https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz | |
tar -xzvf Python-2.7.10.tgz | |
cd Python-2.7.10/ | |
LDFLAGS="-L/usr/lib/x86_64-linux-gnu" ./configure | |
make | |
sudo make install |
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
i = 0 | |
for i in range(1,11): | |
with open("numbers.txt", 'a') as f: #with構文という便利な物がある。オプションのaは追記を意味する | |
f.write('hello, world\n') #文末に\n(macbookだとalt+¥)を入れると改行になる |
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 urllib.request | |
import json | |
location = u'080020' #場所 | |
url = 'http://weather.livedoor.com/forecast/webservice/json/v1?city=%s' %location | |
html = urllib.request.urlopen(url) | |
jsonfile = json.loads(html.read().decode('utf-8')) | |
print('***********') | |
print(jsonfile['pinpointLocations'][0]['name']) |