Browse Source

initial commit

pull/4/head
Igor Elpin 3 years ago
commit
12b2fe0b33
  1. 9
      Dockerfile
  2. 92
      README.md
  3. BIN
      __pycache__/app.cpython-310.pyc
  4. 36
      app.py
  5. 0
      companies/__init__.py
  6. BIN
      companies/__pycache__/__init__.cpython-310.pyc
  7. 8
      companies/infowatch/__init__.py
  8. BIN
      companies/infowatch/__pycache__/__init__.cpython-310.pyc
  9. BIN
      companies/infowatch/__pycache__/jobs.cpython-310.pyc
  10. 45
      companies/infowatch/jobs.py
  11. 8
      companies/performancelab/__init__.py
  12. BIN
      companies/performancelab/__pycache__/__init__.cpython-310.pyc
  13. BIN
      companies/performancelab/__pycache__/jobs.cpython-310.pyc
  14. 11
      companies/performancelab/jobs.py
  15. 8
      companies/visionlabs/__init__.py
  16. BIN
      companies/visionlabs/__pycache__/__init__.cpython-310.pyc
  17. BIN
      companies/visionlabs/__pycache__/jobs.cpython-310.pyc
  18. 20
      companies/visionlabs/jobs.py
  19. 46
      cv.py
  20. 26
      employee/__init__.py
  21. BIN
      employee/__pycache__/__init__.cpython-310.pyc
  22. BIN
      employee/__pycache__/applicants.cpython-310.pyc
  23. 8
      employee/applicants.py
  24. 41
      humans/__init__.py
  25. BIN
      humans/__pycache__/__init__.cpython-310.pyc
  26. 3
      requirements.txt
  27. 3
      static/prism.css
  28. 5
      static/prism.js
  29. BIN
      static/rabbit.png
  30. 43
      templates/index.html
  31. 36
      templates/pycoral.html
  32. 26
      templates/resume.html
  33. 18
      world/__init__.py
  34. BIN
      world/__pycache__/__init__.cpython-310.pyc

9
Dockerfile

@ -0,0 +1,9 @@
# docker build -t ielpin.ru/logovo:latest .
FROM python:3.10.6-slim-buster
WORKDIR /code
COPY . /code/
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]

92
README.md

@ -0,0 +1,92 @@
# Resume
## Getting started
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
## Add your files
- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
```
cd existing_repo
git remote add origin http://192.168.0.200/i.elpin/resume.git
git branch -M main
git push -uf origin main
```
## Integrate with your tools
- [ ] [Set up project integrations](http://192.168.0.200/i.elpin/resume/-/settings/integrations)
## Collaborate with your team
- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
- [ ] [Automatically merge when pipeline succeeds](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
## Test and Deploy
Use the built-in continuous integration in GitLab.
- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
***
# Editing this README
When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template.
## Suggestions for a good README
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
## Name
Choose a self-explaining name for your project.
## Description
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
## Badges
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
## Visuals
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
## Installation
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
## Usage
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
## Support
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
## Roadmap
If you have ideas for releases in the future, it is a good idea to list them in the README.
## Contributing
State if you are open to contributions and what your requirements are for accepting them.
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
## Authors and acknowledgment
Show your appreciation to those who have contributed to the project.
## License
For open source projects, say how it is licensed.
## Project status
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.

BIN
__pycache__/app.cpython-310.pyc

Binary file not shown.

36
app.py

@ -0,0 +1,36 @@
from fastapi import FastAPI,Request
from fastapi.middleware.cors import CORSMiddleware
from fastapi.responses import HTMLResponse
from fastapi.staticfiles import StaticFiles
from fastapi.templating import Jinja2Templates
def get_application():
_app = FastAPI(debug=False,title="MyHome",docs_url=None,redoc_url=None)
_app.add_middleware(
CORSMiddleware,
allow_origins=["*"],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
return _app
app=get_application()
app.mount("/static",StaticFiles(directory="static"),name="static")
templates = Jinja2Templates(directory="templates")\
## TODO Сделать полноценный микроблок
@app.get("/")
def index(request:Request):
return templates.TemplateResponse("index.html",{"request":request})
@app.get("/resume")
def resume(request:Request):
with open("cv.py") as cv:
return templates.TemplateResponse("resume.html",{"request":request,"cv":cv.read()})
@app.get("/pycoral")
def index(request:Request):
return templates.TemplateResponse("pycoral.html",{"request":request})

0
companies/__init__.py

BIN
companies/__pycache__/__init__.cpython-310.pyc

Binary file not shown.

8
companies/infowatch/__init__.py

@ -0,0 +1,8 @@
from world import AbstractCompany
from .jobs import *
class Infowatch(AbstractCompany):
name="ЗАО Инфовотч"
description=f"""Российская компания, специализирующаяся на информационной безопасности в корпоративном секторе:
защите корпораций от утечек информации и целевых атак извне."""

BIN
companies/infowatch/__pycache__/__init__.cpython-310.pyc

Binary file not shown.

BIN
companies/infowatch/__pycache__/jobs.cpython-310.pyc

Binary file not shown.

45
companies/infowatch/jobs.py

@ -0,0 +1,45 @@
from world import AbstractJob
class ImplementationEngineer(AbstractJob):
position="Инженер внедрения"
duties=f"""
- Установка прикладного ПО компании
- Настройка серверов и прикладного ПО под требования заказчика
- Проведение работ по настройке инфраструктуры заказчика для интеграции ПО
- Аудит работы ПО, идентификация и устранение проблем.
"""
class MiddleImplementationEngineer(ImplementationEngineer):
position="Старший инженер внедрения"
duties=f"""
- Разработка проектной документации
- Установка прикладного ПО компании
- Настройка серверов и прикладного ПО под требования заказчика
- Проведение работ по настройке инфраструктуры заказчика для интеграции ПО в инфраструктуру компании заказчика.
- Аудит работы ПО, идентификация и устранение проблем.
- Оптимизация ПО на проектах с высокой нагрузкой.
- Проведений демонстраций и предварительного обучения сотрудников заказчика функционалу продукта.
"""
class SeniorImplementationEngineer(MiddleImplementationEngineer):
position="Ведущий инженер внедрения"
duties=f"""
- Разработка проектной документации
- Установка прикладного ПО компании
- Настройка серверов и прикладного ПО под требования заказчика
- Разработал несколько встраиваемых утилит для использования в основном продукте.
- Обучение стажеров
- Проведение работ по настройке инфраструктуры заказчика для интеграции ПО в инфраструктуру компании заказчика.
- Разработка дополнительного функционала для модуля анализа и принятия решений на lua
- Аудит работы ПО, идентификация и устранение проблем.
- Оптимизация ПО на проектах с высокой нагрузкой.
- Проведений демонстраций и предварительного обучения сотрудников заказчика функционалу продукта.
"""
class TeamLead(AbstractJob):
position="Руководитель группы персональной техподдержки"
duties=f"""
- Техническое сопровождение клиентов по техническим вопросам продуктов
- Организация и контроль работы группы персонального технического обслуживания (3-4 человека)
- Проработка вопросов по автоматизации бизнес-процессов группы (обработка заявок, контроль SLA, подсчет KPI)
"""

8
companies/performancelab/__init__.py

@ -0,0 +1,8 @@
from world import AbstractCompany
from .jobs import *
class PerformanceLab(AbstractCompany):
name="ООО Перформанс Лабс"
description=f"Российская компания, сервис-провайдер в области тестирование программного обеспечения."

BIN
companies/performancelab/__pycache__/__init__.cpython-310.pyc

Binary file not shown.

BIN
companies/performancelab/__pycache__/jobs.cpython-310.pyc

Binary file not shown.

11
companies/performancelab/jobs.py

@ -0,0 +1,11 @@
from world import AbstractJob
class PerformanceEngineer(AbstractJob):
position="Инженер по нагрузочному тестированию"
duties=f"""
- Анализ работы тестируемых систем
- Разработка нагрузочных тестов
- Проведение нагрузочного тестирования
- Поиск узких мест (bottlenecks)
"""

8
companies/visionlabs/__init__.py

@ -0,0 +1,8 @@
from world import AbstractCompany
from .jobs import *
class Visionlabs(AbstractCompany):
name="ООО ВИЖНЛАБС"
description=f"""Российская компания, специализирующаяся на создании продуктов и решений в области распознавания лиц и объектов,
дополненной и виртуальной реальности."""

BIN
companies/visionlabs/__pycache__/__init__.cpython-310.pyc

Binary file not shown.

BIN
companies/visionlabs/__pycache__/jobs.cpython-310.pyc

Binary file not shown.

20
companies/visionlabs/jobs.py

@ -0,0 +1,20 @@
from world import AbstractJob
class DevOpsEngineer(AbstractJob):
position="Devops"
duties=f"""
- Обеспечение процесса сборки и тестирования в Gitlab
- Сборка инфраструктурных и продакшн образов Docker
-
"""
class ServiceEngineer(AbstractJob):
position="Ведущий сервисный инженер"
duties=f"""
- Внедрение продуктов компании
- Разработка интеграционных решений
- Проектирование отказоустойчивых архитектур под высокие нагрузки (кластер и балансировка - связка nginx, haproxy,Redis,rabbitmq)
- Мониторинг на стэке TICK (Influxdata) Telegraf ,influxdb,Grafana. Алертинг через telegram бота.
- Сборка тестовых и демонстрационных решений для клиентов в docker
- Разработка тестовых и вспомогательных утилит для сбора датасета с камер (Astra Pro S и Axis)
"""

46
cv.py

@ -0,0 +1,46 @@
"""
Шуточное кодовое представление моего резюме. Enjoy!
"""
from humans import Sex
from employee.applicants import Applicant
from companies.performancelab import PerformanceLab,PerformanceEngineer
from companies.infowatch import (
Infowatch,
ImplementationEngineer,
MiddleImplementationEngineer,
SeniorImplementationEngineer,
TeamLead
)
from companies.visionlabs import Visionlabs,ServiceEngineer,DevOpsEngineer
me = Applicant( first_name="Игорь",
last_name="Ельпин",
sex=Sex.MALE,
birthday="16-11-1989")
me.discover_company(PerformanceLab)
me.enter_job(PerformanceEngineer(
start="08.2011",
end="10.2012"))
me.discover_company(Infowatch)
me.enter_job(ImplementationEngineer(
start="10.2012",
end="03.2014"))
me.enter_job(MiddleImplementationEngineer(
start="03.2014",
end="04.2016"))
me.enter_job(SeniorImplementationEngineer(
start="04.2016",
end="09.2018"))
me.enter_job(TeamLead(
start="09.2018",
end="09.2019"))
me.discover_company(Visionlabs)
me.enter_job(ServiceEngineer(
start="09.2019",
end="06.2020"))
me.enter_job(DevOpsEngineer(
start="09.2020"))
me.represent()

26
employee/__init__.py

@ -0,0 +1,26 @@
from humans import AbstractHuman
class Employee(AbstractHuman):
known_companies=list()
current_company=None
expirience=list()
achivements=list()
def enter_job(self,job):
description=f"""
{job.start} -> {job.end}:
{repr(self.current_company)} - {job.position}
Мои обязанности и достижения:
{job.duties}
=============================
{self.achivements}
"""
self.expirience.append(description)
@property
def summary(self):
return "\n".join(self.expirience)
def represent(self) -> None:
self.say(self.about())
self.say(self.summary) if self.summary else self.say("Немного занят, отвечу позднее.")

BIN
employee/__pycache__/__init__.cpython-310.pyc

Binary file not shown.

BIN
employee/__pycache__/applicants.cpython-310.pyc

Binary file not shown.

8
employee/applicants.py

@ -0,0 +1,8 @@
from . import Employee
class Applicant(Employee):
looking_for_jobs=True
def discover_company(self,company):
self.known_companies.append(company.name)
self.current_company=company.name

41
humans/__init__.py

@ -0,0 +1,41 @@
from datetime import date,datetime
from enum import Enum
class Sex(Enum):
MALE="Мужчина",
FEMALE="Женщина"
def __repr__(self) -> str:
return f"{self.value}"
class AbstractHuman:
def __init__(self,first_name:str,last_name:str,sex:Sex,birthday:str) -> None:
self.first_name=first_name
self.last_name=last_name
self.sex=sex
self.birthday=datetime.strptime(birthday, "%d-%m-%Y").date()
@property
def age(self) -> int:
age=datetime.now().year-self.birthday.year
if age>0:
return int(age)
else:
raise "Мамочка! Меня еще не родили"
def _eat(self):
pass
def _sleep(self):
pass
def _play(self):
pass
def say(self,speach: str) -> None:
print(f"{self.first_name} {self.last_name}: {speach}")
def about(self):
return f"{self.first_name} {self.last_name}. {repr(self.sex)} {self.birthday} ({self.age} полных лет)"

BIN
humans/__pycache__/__init__.cpython-310.pyc

Binary file not shown.

3
requirements.txt

@ -0,0 +1,3 @@
fastapi
uvicorn
jinja2

3
static/prism.css

@ -0,0 +1,3 @@
/* PrismJS 1.28.0
https://prismjs.com/download.html#themes=prism-okaidia&languages=markup+python */
code[class*=language-],pre[class*=language-]{color:#f8f8f2;background:0 0;text-shadow:0 1px rgba(0,0,0,.3);font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto;border-radius:.3em}:not(pre)>code[class*=language-],pre[class*=language-]{background:#272822}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#8292a2}.token.punctuation{color:#f8f8f2}.token.namespace{opacity:.7}.token.constant,.token.deleted,.token.property,.token.symbol,.token.tag{color:#f92672}.token.boolean,.token.number{color:#ae81ff}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#a6e22e}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url,.token.variable{color:#f8f8f2}.token.atrule,.token.attr-value,.token.class-name,.token.function{color:#e6db74}.token.keyword{color:#66d9ef}.token.important,.token.regex{color:#fd971f}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}

5
static/prism.js

File diff suppressed because one or more lines are too long

BIN
static/rabbit.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

43
templates/index.html

@ -0,0 +1,43 @@
<html>
<head>
<title>Логово Игоря</title>
<link rel="stylesheet" href="{{ url_for('static', path='/prism.css') }}" rel="stylesheet">
<script src="{{ url_for('static', path='/prism.js')}}"></script>
<link href="https://unpkg.com/nes.css@2.3.0/css/nes.min.css" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css?family=Press+Start+2P" rel="stylesheet">
</head>
<body style="background-color: #000000">
<header class>
<div class="container" >
<div class="nav-brand">
<h2 style="color: #00aa00 ;">Логово Игоря</h2>
<div class="nes-balloon from-right is-dark">
<div class="name">
Привет! Я Игорь.
</div>
<p>Прогаю,ковыряю DevOps-пайплайны,малинки и прочие SBC...</p>
</div>
</div>
</div>
</header>
<div class="about">
<img src="/static/rabbit.png">
<a href="/" class="nes-btn is-success ">Главная</a>
<a href="tg://resolve?domain=@ElpinOfficial" class="nes-btn is-primary">Мой Телеграм: @ElpinOfficial </a>
<a href="https://github.com/teleigran" class="nes-btn is-warning "><i class="nes-icon github is-medium"></i> GitHub</a>
<i>Rendered by <b>FastApi</b></i>
</div>  
<pre title="projects.py">
<code class="language-python">
def show_my_projects():
return [project for project in projects if project.sense is not None]
</code>
<a href="/resume" class="nes-btn is-primary"><i class="nes-icon github is-small"></i><b> `>>> class project <span style="color:#ac0909 ;">Resume</span>`</span>`</b></a>
<a href="/pycoral" class="nes-btn is-primary"><i class="nes-icon github is-small"></i><b> `>>> class project<span style="color:#ac0909 ;"> PYCORAL_CCTV</span>`</b></a>
</pre>
</div>
</body>
</html>

36
templates/pycoral.html

@ -0,0 +1,36 @@
<html>
<head>
<title>Логово Игоря</title>
<link rel="stylesheet" href="{{ url_for('static', path='/prism.css') }}" rel="stylesheet">
<script src="{{ url_for('static', path='/prism.js')}}"></script>
<link href="https://unpkg.com/nes.css@2.3.0/css/nes.min.css" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css?family=Press+Start+2P" rel="stylesheet">
</head>
<body style="background-color: #000000">
<div class="nes-container with-title" style="background-color: #000000">
<div class="nes-balloon from-right is-dark"
<h1 style="color: #00ff00 ;">(Google Coral + RPi 4)*RTSPCam = CCTV?</h1>
</div>
<div class="about">
<img src="/static/rabbit.png">
<a href="/" class="nes-btn is-success ">Другие поделки</a>
<a href="tg://resolve?domain=@iElpin" class="nes-btn is-primary">Мой Телеграм: @iElpin </a>
</div>  
<pre title="cv.py" style="font-size: 20px">
<code class="language-python">
def pycoral_cctv(pycoral_cctv):
return pycoral_cctv.story
</code>
<p>
Моя малинка 4 верой и правдой служила мне как детектор движения на даче в деревне.
Только вот одна была с ней беда:
motioneye и под капотом motion безбожно срабатывали буквально на все - дождь снег ветер.
Как-то вспомнил что давно хотел присмотреться к ускорителю Google Coral.
Пока заказанный свисток отправлялся со склада в Мск, я думал как мне его использовать.
</p>
</pre>
</div>
</body>
</html>

26
templates/resume.html

@ -0,0 +1,26 @@
<html>
<head>
<title>Логово Игоря</title>
<link rel="stylesheet" href="{{ url_for('static', path='/prism.css') }}" rel="stylesheet">
<script src="{{ url_for('static', path='/prism.js')}}"></script>
<link href="https://unpkg.com/nes.css@2.3.0/css/nes.min.css" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css?family=Press+Start+2P" rel="stylesheet">
</head>
<body style="background-color: #000000">
<div class="nes-container with-title" style="background-color: #000000">
<div class="nes-balloon from-right is-dark"
<h1 style="color: #00ff00 ;">Wake up,HR... Follow the white rabbit... </h1>
</div>
<div class="about">
<img src="/static/rabbit.png">
<a href="/" class="nes-btn is-success ">Другие поделки</a>
<a href="tg://resolve?domain=@iElpin" class="nes-btn is-primary">Мой Телеграм: @iElpin </a>
</div>  
<pre title="cv.py" style="font-size: 20px">
<code class="language-python">
{{cv}}
</code>
</pre>
</div>
</body>
</html>

18
world/__init__.py

@ -0,0 +1,18 @@
from datetime import date,datetime,timedelta
class AbstractCompany:
def __init__(self,name,description) -> None:
self.name=name
self.description=description
def __repr__(self) -> str:
return f"{self.name}\n{self.description}"
class AbstractJob:
def __init__(self,start:str,end:str=None) -> None:
self.start=datetime.strptime(start, "%m.%Y").date()
if end:
self.end=datetime.strptime(end, "%m.%Y").date()
else:
self.end=datetime.now().date()
self.delta=(datetime.now().date()-self.end)

BIN
world/__pycache__/__init__.cpython-310.pyc

Binary file not shown.
Loading…
Cancel
Save