moved project files to python folder

This commit is contained in:
selcuk committed 2022-06-27 12:11:32 +03:00
1 parent a15a19ae39
commit 0ace6ebb5b
9 files changed

No files matched your search

+1
View File
@@ -0,0 +1 @@
esptool.py --chip auto --port /dev/ttyUSB0 --baud 115200 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size 16MB 0x8000 partition_table/partition-table.bin 0x10000 ota_data_initial.bin 0xf000 phy_multiple_init_data.bin 0x1000 bootloader/bootloader.bin 0x100000 esp-at.bin 0x20000 at_customize.bin 0x24000 customized_partitions/server_cert.bin 0x39000 customized_partitions/mqtt_key.bin 0x26000 customized_partitions/server_key.bin 0x28000 customized_partitions/server_ca.bin 0x2e000 customized_partitions/client_ca.bin 0x30000 customized_partitions/factory_param.bin 0x21000 customized_partitions/ble_data.bin 0x3B000 customized_partitions/mqtt_ca.bin 0x37000 customized_partitions/mqtt_cert.bin 0x2a000 customized_partitions/client_cert.bin 0x2c000 customized_partitions/client_key.bin
Whitespace-only changes.
+30
View File
@@ -0,0 +1,30 @@
from flask import Flask, render_template, url_for, request, redirect
from datetime import datetime
import random
app = Flask(__name__)
Logs = []
Logs.append("Hello World 1");
Logs.append("Hello World 2");
Logs.append("Hello World 3");
Logs.append("Hello World 4");
@app.route('/', methods=['POST', 'GET'])
def index():
if request.method == 'POST':
if request.form.get('Clear') == 'Clear':
Logs.clear();
return render_template("index.html",Logs = Logs)
elif request.form.get('Randomize') == 'Randomize':
Logs.append(str(random.random()));
return render_template("index.html",Logs = Logs)
else:
return render_template('index.html',Logs = Logs)
@app.route('/dependent')
def i():
return render_template('dependent.html')
if __name__ == "__main__":
app.run(debug=True)
+54
View File
@@ -0,0 +1,54 @@
from logging import root
import os
import subprocess
class DirectoryItem():
def __init__(self,rootDir,name) -> None:
self.name = name
self.path = os.path.join(rootDir,name)
self.itemList = []
sList = os.listdir(self.path)
for p in sList:
self.itemList.append(DirectoryItem(self.path,p))
pass
def print(self):
print(self.path)
for i in self.itemList:
i.print();
def getItem(self,i):
return self.itemList[i]
class Firmware(DirectoryItem):
pass
class SubModule(DirectoryItem):
pass
class Project(DirectoryItem):
pass
class Projects(DirectoryItem):
pass
rootdir = './Projects'
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello_world():
return "<p>Hello, World!</p>"
def main():
# p = Projects(rootdir,"")
# p.print()
app.run()
pass;
if __name__ == "__main__":
main();
+27
View File
@@ -0,0 +1,27 @@
aiofiles==0.8.0
ajsonrpc==1.2.0
anyio==3.6.1
asgiref==3.5.2
bottle==0.12.21
certifi==2022.6.15
charset-normalizer==2.0.12
click==8.1.3
colorama==0.4.5
h11==0.13.0
idna==3.3
ifaddr==0.2.0
marshmallow==3.16.0
packaging==21.3
platformio==6.0.2
pyelftools==0.28
pyparsing==3.0.9
pyserial==3.5
requests==2.28.0
semantic-version==2.10.0
sniffio==1.2.0
starlette==0.20.3
tabulate==0.8.10
urllib3==1.26.9
uvicorn==0.17.6
wsproto==1.1.0
zeroconf==0.38.7
+36
View File
@@ -0,0 +1,36 @@
body, html {
margin: 0;
font-family: sans-serif;
background-color: lightblue;
}
.content {
margin: 0 auto;
width: 400px;
}
table, td, th {
border: 1px solid #aaa;
}
table {
border-collapse: collapse;
width: 100%;
}
th {
height: 30px;
}
td {
text-align: center;
padding: 5px;
}
.form {
margin-top: 20px;
}
#content {
width: 70%;
}
+13
View File
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="{{ url_for('static', filename='css/main.css') }}">
{% block head %}{% endblock %}
</head>
<body>
{% block body %}{% endblock %}
</body>
</html>
+100
View File
@@ -0,0 +1,100 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>
Cascading Dependent Dropdown Country, State, City Using JavaScript
</title>
<style>
.worldForm {
background: #00bcd4;
border: 1px solid #e4e4e4;
border-radius: 4px;
padding: 20px;
}
.lists {
margin-bottom: 20px;
}
</style>
</head>
<body>
<form class="worldForm">
<div class="lists">
<label>Select Country:</label>
<select name="country" id="countyList">
<option value="" selected="selected">Select Country</option>
</select>
</div>
<div class="lists">
<label>Select State:</label>
<select name="state" id="stateList">
<option value="" selected="selected">Select State</option>
</select>
</div>
<div class="lists">
<label>Select City:</label>
<select name="city" id="cityList">
<option value="" selected="selected">Select City</option>
</select>
</div>
</form>
<script>
var worldData = {
USA: {
California: ["Los Angeles", "San Diego", "Sacramento"],
Texas: ["Houston", "Austin"],
Florida: ["Miami", "Orlando", "Tampa"],
},
India: {
Maharashtra: ["Mumbai", "Pune", "Nagpur"],
TamilNadu: ["Chennai", "Madurai"],
Karnataka: ["Bangalore", "Mangalore"],
},
Canada: {
Alberta: ["Calgary", "Edmonton", "Red Deer"],
BritishColumbia: ["Vancouver", "Kelowna"],
Manitoba: ["Winnipeg", "Brandon"],
},
Germany: {
Bavaria: ["Munich", "Nuremberg"],
NorthRhine: ["Cologne", "Düsseldorf"],
},
};
window.onload = function () {
var countyList = document.getElementById("countyList"),
stateList = document.getElementById("stateList"),
cityList = document.getElementById("cityList");
for (var country in worldData) {
countyList.options[countyList.options.length] = new Option(
country,
country
);
}
countyList.onchange = function () {
stateList.length = 1;
cityList.length = 1;
if (this.selectedIndex < 1) return;
for (var state in worldData[this.value]) {
stateList.options[stateList.options.length] = new Option(
state,
state
);
}
};
countyList.onchange();
stateList.onchange = function () {
cityList.length = 1;
if (this.selectedIndex < 1) return;
var city = worldData[countyList.value][this.value];
for (var i = 0; i < city.length; i++) {
cityList.options[cityList.options.length] = new Option(
city[i],
city[i]
);
}
};
};
</script>
</body>
</html>
+26
View File
@@ -0,0 +1,26 @@
{% extends 'base.html' %} {% block head %}
<title>Anka Anvil</title>
{% endblock %} {% block body %}
<div class="content">
<h3 style="text-align: center">Please choose an application below</h3>
<ul>
<li>FFlash Firmware</li>
<li>Create PCB Panel</li>
</ul>
<textarea
readonly
id="w3review"
name="w3review"
rows="4"
cols="50"
style="resize: none; width: 600px; height: 500px"
>
{% for log in Logs %}{{log}}
{% endfor %}
</textarea>
<form method="post" action="/">
<input type="submit" value="Clear" name="Clear" />
<input type="submit" value="Randomize" name="Randomize" />
</form>
</div>
{% endblock %}