-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aab6a7e
commit a27797d
Showing
12 changed files
with
165 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
clock: python taskrunner.py | ||
webapp: python scanandshow.py |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
14.4258752 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
14.4278076 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
click==7.1.2 | ||
Flask==1.1.1 | ||
gunicorn==20.0.4 | ||
itsdangerous==1.1.0 | ||
Jinja2==2.11.2 | ||
MarkupSafe==1.1.1 | ||
Werkzeug==1.0.1 | ||
requests==2.22.0 | ||
psycopg2==2.8.2 | ||
APScheduler==3.0.0 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from flask import Flask, render_template, request | ||
import requests as apirequest | ||
app = Flask(__name__) | ||
key="" | ||
weatherkey="" | ||
@app.route('/') | ||
def index(): | ||
f=open("number.txt",'r') | ||
num=f.readline() | ||
f.close() | ||
return render_template('time.html', number=num) | ||
if __name__ == '__main__': | ||
app.run( | ||
host="0.0.0.0", | ||
port=80 | ||
) | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from apscheduler.schedulers.blocking import BlockingScheduler | ||
import time | ||
sched = BlockingScheduler() | ||
|
||
|
||
|
||
|
||
@sched.scheduled_job('interval', seconds=3) | ||
def timed_job1(): | ||
f=open("number.txt","w") | ||
num=time.clock() | ||
num=str(num) | ||
f.write(num) | ||
f.close() | ||
print('This job is run every three seconds.') | ||
|
||
@sched.scheduled_job('interval', seconds=3) | ||
def timed_job2(): | ||
f=open("number1.txt","w") | ||
num=time.clock() | ||
num=str(num) | ||
f.write(num) | ||
f.close() | ||
print('This job is run every three seconds.') | ||
|
||
sched.start() |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<link href="bootstrap/3.0.0/css/bootstrap.min.css" | ||
rel="stylesheet"> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<div class="header"> | ||
</div> | ||
<hr/> | ||
<div> | ||
Your IP address is: <strong>{{user_ip}}</strong> | ||
<div class="header"> | ||
</div> | ||
<hr/> | ||
</body> | ||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<link href="bootstrap/3.0.0/css/bootstrap.min.css" | ||
rel="stylesheet"> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<div class="header"> | ||
</div> | ||
<hr/> | ||
<div> | ||
Your IP address is: <strong>{{user_ip}}</strong> | ||
<div class="header"> | ||
</div> | ||
<hr/> | ||
</body> | ||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<link href="bootstrap/3.0.0/css/bootstrap.min.css" | ||
rel="stylesheet"> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<div class="header"> | ||
</div> | ||
<hr/> | ||
<div> | ||
The number is: <strong>{{number}}</strong> | ||
<div class="header"> | ||
</div> | ||
<hr/> | ||
</body> | ||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<link href="bootstrap/3.0.0/css/bootstrap.min.css" | ||
rel="stylesheet"> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<div class="header"> | ||
</div> | ||
<hr/> | ||
<div> | ||
The number is: <strong>{{number}}</strong> | ||
<div class="header"> | ||
</div> | ||
<hr/> | ||
</body> | ||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<link href="bootstrap/3.0.0/css/bootstrap.min.css" | ||
rel="stylesheet"> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<div class="header"> | ||
</div> | ||
<hr/> | ||
<div> | ||
Your weather is: <strong>{{user_weather}}</strong> | ||
<div class="header"> | ||
</div> | ||
<hr/> | ||
</body> | ||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<link href="bootstrap/3.0.0/css/bootstrap.min.css" | ||
rel="stylesheet"> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<div class="header"> | ||
</div> | ||
<hr/> | ||
<div> | ||
Your weather is: <strong>{{user_weather}}</strong> | ||
<div class="header"> | ||
</div> | ||
<hr/> | ||
</body> | ||
</html> |