From d17d0e55537d7776ba0ef1997dbea40caad9578e Mon Sep 17 00:00:00 2001 From: Igor Elpin Date: Tue, 16 Aug 2022 15:44:45 +0300 Subject: [PATCH] fix style favicon. add some plugs --- app.py | 11 ++- cv.py | 1 - employee/__init__.py | 3 +- employee/__pycache__/__init__.cpython-310.pyc | Bin 1308 -> 1327 bytes static/favicon.png | Bin 0 -> 910 bytes templates/cv.html | 45 +++++++++++ templates/index.html | 73 ++++++++++++++---- templates/pycoral.html | 8 +- templates/resume.html | 26 ------- 9 files changed, 119 insertions(+), 48 deletions(-) create mode 100644 static/favicon.png create mode 100644 templates/cv.html delete mode 100644 templates/resume.html diff --git a/app.py b/app.py index e46e95e..4deefe9 100644 --- a/app.py +++ b/app.py @@ -3,6 +3,7 @@ from fastapi.middleware.cors import CORSMiddleware from fastapi.responses import HTMLResponse from fastapi.staticfiles import StaticFiles from fastapi.templating import Jinja2Templates +import os def get_application(): _app = FastAPI(debug=False,title="MyHome",docs_url=None,redoc_url=None) @@ -21,15 +22,19 @@ app=get_application() app.mount("/static",StaticFiles(directory="static"),name="static") templates = Jinja2Templates(directory="templates")\ -## TODO Сделать полноценный микроблок +## TODO Сделать полноценный микроблог @app.get("/") def index(request:Request): return templates.TemplateResponse("index.html",{"request":request}) -@app.get("/resume") +## TODO Сделать вывод через вебсокет +@app.get("/cv") def resume(request:Request): with open("cv.py") as cv: - return templates.TemplateResponse("resume.html",{"request":request,"cv":cv.read()}) + code_result=os.popen("python3 cv.py").read() + return templates.TemplateResponse("cv.html",{"request":request, + "cv":cv.read(), + "code_result":code_result}) @app.get("/pycoral") def index(request:Request): diff --git a/cv.py b/cv.py index 73d2df3..347ef08 100644 --- a/cv.py +++ b/cv.py @@ -1,4 +1,3 @@ - """ Шуточное кодовое представление моего резюме. Enjoy! """ diff --git a/employee/__init__.py b/employee/__init__.py index fa7fce3..e42995b 100644 --- a/employee/__init__.py +++ b/employee/__init__.py @@ -20,7 +20,8 @@ class Employee(AbstractHuman): @property def summary(self): - return "\n".join(self.expirience) + return "\n".join(reversed(self.expirience)) + def represent(self) -> None: self.say(self.about()) self.say(self.summary) if self.summary else self.say("Немного занят, отвечу позднее.") diff --git a/employee/__pycache__/__init__.cpython-310.pyc b/employee/__pycache__/__init__.cpython-310.pyc index b20794c6ddb56de8efa76b2363ae7625d7a07f66..b3870b024202bba197cf649c3101a1aa04399ef9 100644 GIT binary patch delta 155 zcmbQkwVsPNpO=@50SGQP{Z3Ne$Q#8Zp`)LXpPQBbr(cv>T$-C2pHrGsHMxo@ z%ajGE)ES721%N~f;{t{f#u|n!re?;4jKK_=On$c*xipz?v1H|E=H22bN-aw*Do#zA y%+0LJC@|TQc_*7NP+O7ECR?#2K!n97FJLiaWS)GT#T5YRe<*_h delta 140 zcmZ3_HHV8gpO=@50SM+F`IRKGkvED-SY1COKQ~oBGrcG=ProR&xHLC)ay?U)Ix|p} zGY}W^0EraF1q?L|S&R!AgBdiL{BALFX)@hn$;!{nn=Hqy%g8g?hj}NP5Kv)};ACzV jSw@M;nk>qU!jpYj5+K52lNnjXC!b=GXJnfEip3QGx{)C@ diff --git a/static/favicon.png b/static/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..0dcfffc933602cc65b4923ce39fbf9a3df08d842 GIT binary patch literal 910 zcmV;919AL`P)NQforEsEHR( zcrhaJ;)TSciJp8MKrdbm2^bF^NFd?hL2HPw3rJ0Y5P@K@6eyweu{$2Nw7cDw?zYlG z+~0}$&rJG#GvCZCfR2uij?VuKlUS(fU9S`v{uux#fP&mhN{XKWMkr|abf?uV?T{IW zivJFvIH&T|<6|jln7nKGwOL@Lz0sB5sp0{kNMQIU(gK?>z?nlanQ}$iNHnlhGQSm8 zX(Q3Vu0uDFZ@5e*y=pVzQnfhs>1YT&UqVU8P2Jh6s0AW`$0wlwM;LwMVF)z&_`@&P zRB6$?0~P~=a}{yl4x6?$Fmpg%DT{~AMm%?zlrO19G#fa7h`=P#Tvx_o|DNWvkaP046`?9-7G|g@-BPcP8aT%G3z`Y~@0M1qrSPbgZyc~?5 zTr-#5DbQrVVUNehHOIp>E9TiqfD4r*)iebsO5$S|*Xb4`)1ztcH?vLwe46JGPt=DPr9 zRs_{^lA(GBS|txwN4)_Z^~&qdVdF45&nxNx@ZfzAfOvqXmIeIu3dk<~BB~4&8X25Y zvARw>!K07K`})SSi%Kd~8Ms(QK%!yuZBUH=k#GCyasrMO&q-|&3y&|mSZG0&0qOV7 zn~4Y>yMnU*fvaXT9U!r>9$)g0yX_$DA?8@1xl($7mDk?pp$6n{MJ`Bd;7mDz)hND} zya0S&P{u=Qps|dg)ROHtrg~(*WPjoR7Z<~}Gu>Gb)4l8eBhwA!n?wWtyr|H|inJj! zzyKq;)sg`eL((QI@1xxSd^r`Q4KLxzeQ7~vV7k-lW+`a^FaTgRm&($x3W|ObA&s7U kmf3uZ(b3V-(b+lt1y0%GBm%YqLjV8(07*qoM6N<$g65Q=9{>OV literal 0 HcmV?d00001 diff --git a/templates/cv.html b/templates/cv.html new file mode 100644 index 0000000..efff0b9 --- /dev/null +++ b/templates/cv.html @@ -0,0 +1,45 @@ + + + Логово Игоря + + + + + + +
+
Wake up,HR... Follow the white rabbit... +
+    + + + + + + + + + +
+
+            
+                {{cv}}
+            
+        
+
+
+            
+                {{code_result}}
+            
+        
+
+
+ + \ No newline at end of file diff --git a/templates/index.html b/templates/index.html index b825a9f..7941079 100644 --- a/templates/index.html +++ b/templates/index.html @@ -2,12 +2,12 @@ Логово Игоря - + - +
   - -
-            
-                def show_my_projects():
-                    return [project for project in projects if project.sense is not None]
-            
-            
-             `>>> class project Resume``
-             `>>> class project PYCORAL_CCTV`
-        
+ + + + + + + + + +
+
+                
+                
+                    from humans                 import Sex
+                    from employee.applicants    import Applicant
+
+                    me = Applicant( first_name="Игорь",
+                                    last_name="Ельпин",
+                                    sex=Sex.MALE,
+                                    birthday="16-11-1989")
+
+                    me.say(me.about())   
+                    me.say(me.hard_skills()) 
+                
+                
+
+
+

Игорь Ельпин(говорит): + Игорь Ельпин. Мужчина 1989-11-16 (33 полных лет) +

+
+
+

Игорь Ельпин(говорит):

+
+

Hard Skill: Linux = 85%

+ +
+
+

Hard Skill: Docker = 55%

+ +
+
+

Hard Skill: Python = 35%

+ +
+
+
+
+                
+                    def show_my_projects():
+                        return [project for project in projects if project.sense is not None]
+                
+            
+
+ `>>> class project Resume`` + `>>> class project PYCORAL_CCTV` +
\ No newline at end of file diff --git a/templates/pycoral.html b/templates/pycoral.html index d2d9b51..8b726d8 100644 --- a/templates/pycoral.html +++ b/templates/pycoral.html @@ -6,15 +6,15 @@ - -
+ +
(Google Coral + RPi 4)*RTSPCam = CCTV? +

(Google Coral + RPi 4)*RTSPCam = CCTV?

  
             
diff --git a/templates/resume.html b/templates/resume.html
deleted file mode 100644
index d15ddf9..0000000
--- a/templates/resume.html
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-    Логово Игоря
-    
-    
-    
-    
-
-
-    
-
Wake up,HR... Follow the white rabbit... -
-    -
-            
-                {{cv}}
-            
-        
-
- - \ No newline at end of file -- 2.36.1