Initial commit

This commit is contained in:
IRBorisov 2024-06-07 20:00:25 +03:00
commit d617d3cbc8
32 changed files with 1739 additions and 0 deletions

2
.gitattributes vendored Normal file
View File

@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto

35
C++.txt Normal file
View File

@ -0,0 +1,35 @@
Upgrade code: 7E57EE0B-9FF4-4A12-9776-B5B7FBBC803E
00. give maximum info to compiler
01. express intent
02. const correctness - values, refs, in-build types
03. full logic (dont skip else after return)
04. skip control block if possible
05. use reference for polymorphism
06. pointer is a nullable reference
07. use smart pointers for ownership
08. use RAII for cleanup on errors
09. dont =delete move ctor (delete copy ctor instead)
10. auto stick and auto deduce!
11. west const
12. noexcept false if noexcept was considered and discarded
13. use algorithm and numeric instead of loops
14. maybe unused to combat assert warnings in realease build
15. nodiscard if function doesnt mutate any state
16. mark unreachable code to draw attention
17. dont use && and || to compose differenet semantic checks!
18. dont bundle return points together!
19. dont mix virtual inheritance and MFC classes
Èìåíîâàíèå èäåíòèôèêàòîðîâ ðåñóðñîâ
IXTRAD - àññîöèàöèè ôàéëîâ, ìåíþ è èêîíîâ äëÿ òèïîâ äîêóìåíòîâ
IXTRR - èêîíêè, êàðòèíêè, êóðñîðû è ïðî÷
IXTRC - êîììàíäû, êîíòðîëû
IXTRD - äèàëîãè
IXTRE - ñîîáùåíèÿ îá îøèáêà
IXTRS - ñòðîêè
IXTRO - èìåíà ïàðàìåòðîâ â ðååñòðå
ID, IDC, AFX - èäåíòèôèêàòîðû MFC

9
Commit messages.txt Normal file
View File

@ -0,0 +1,9 @@
https://chris.beams.io/posts/git-commit/
1. Separate subject from body with a blank line
2. Limit the subject line to 50 characters
3. Capitalize the subject line
4. Do not end the subject line with a period
5. Use the imperative mood in the subject line
6. Wrap the body at 72 characters
7. Use the body to explain what and why vs. how

33
PowerShell.txt Normal file
View File

@ -0,0 +1,33 @@
0. Docs example
<#
.SYNOPSIS
Performs monthly data updates.
.DESCRIPTION
The Update-Month.ps1 script updates the registry with new data generated
during the past month and generates a report.
.PARAMETER InputPath
Specifies the path to the CSV-based input file.
.PARAMETER OutputPath
Specifies the name and path for the CSV-based output file. By default,
MonthlyUpdates.ps1 generates a name from the date and time it runs, and
saves the output in the local directory.
.INPUTS
None. You cannot pipe objects to Update-Month.ps1.
.OUTPUTS
None. Update-Month.ps1 does not generate any output.
.EXAMPLE
PS> .\Update-Month.ps1
.EXAMPLE
PS> .\Update-Month.ps1 -inputpath C:\Data\January.csv
.EXAMPLE
PS> .\Update-Month.ps1 -inputpath C:\Data\January.csv -outputPath C:\Reports\2009\January.csv
#>

13
PublishConceptPortal.ps1 Normal file
View File

@ -0,0 +1,13 @@
$tmp = "gitTemp"
$source = "Concept-Web"
$destination = "ConceptPortal"
if (Test-Path -Path $tmp) {
Remove-Item $tmp -Recurse -Force
}
Remove-Item -recurse $destination\* -exclude .git
& git clone $source $tmp
Copy-Item $tmp\* $destination\ -Recurse -Exclude .git
Remove-Item $tmp\ -Recurse -Force

36
Python.txt Normal file
View File

@ -0,0 +1,36 @@
1. Use naming guidelines
https://www.python.org/dev/peps/pep-0008/#package-and-module-names
2. Use docstrings
https://www.python.org/dev/peps/pep-0257/
3. Basic input/output
in_file = open("input.txt", "r", encoding="utf-8")
lines = [line.strip() for line in in_file.readlines()]
in_file.close()
# process lines
lines = [process_line(line) for line in lines]
# output result
out_file = open("output.txt", "w", encoding="utf-8")
out_file.writelines([line + '\n' for line in lines])
out_file.close()
4. Install Virtual Env
$python -m venv $targetPath
5. Requirements
$python -m pip freeze > requirements.txt
OR
$python -m pip install --user pipenv
cd myproject
$python -m pipenv install requests
6. Reset Virtual Env
$python -m pip freeze > unins && pip uninstall -y -r unins && rm unins
7. Create wheels for project
$python -m pip wheel . -w $folder

9
configs/.gitignore vendored Normal file
View File

@ -0,0 +1,9 @@
.vscode
.vs
*.user
*.aps
~*
*.pch.tmp
*.clang.pch
build

58
configs/Dockerfile Normal file
View File

@ -0,0 +1,58 @@
# ubunutu is the base image
FROM ubuntu:20.04 as cpp-builder
LABEL version="1.0"
LABEL author="IRBorisov iborisov@acconcept.ru"
ENV DEBIAN_FRONTEND=noninteractive
# ENV TZ=Europe/Moscow
# RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# Install standard packages
RUN apt-get update -qq && \
apt-get install -y --no-install-recommends \
wget \
git \
software-properties-common \
build-essential \
gpg-agent \
cmake \
python3 \
python3-pip \
cppcheck
# Install conan
RUN python3 -m pip install --upgrade pip setuptools && \
python3 -m pip install conan && \
conan --version
# Set compiler versions as arguments
ARG GCC_VER="11"
ARG LLVM_VER="14"
# Add GCC compiler
RUN add-apt-repository -y ppa:ubuntu-toolchain-r/test && \
apt-get update -qq && \
apt-get install -y --no-install-recommends gcc-${GCC_VER} g++-${GCC_VER} && \
update-alternatives --install /usr/bin/gcc gcc $(which gcc-${GCC_VER}) 100 && \
update-alternatives --install /usr/bin/g++ g++ $(which g++-${GCC_VER}) 100
# Add Clang compiler
RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - 2>/dev/null
RUN add-apt-repository -y "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-${LLVM_VER} main" && \
apt-get update -qq && \
apt-get install -y --no-install-recommends \
clang-${LLVM_VER} lldb-${LLVM_VER} lld-${LLVM_VER} clangd-${LLVM_VER} \
llvm-${LLVM_VER}-dev libclang-${LLVM_VER}-dev clang-tidy-${LLVM_VER} && \
update-alternatives --install /usr/bin/clang clang $(which clang-${LLVM_VER}) 100 && \
update-alternatives --install /usr/bin/clang++ clang++ $(which clang++-${LLVM_VER}) 100 && \
update-alternatives --install /usr/bin/clang-tidy clang-tidy $(which clang-tidy-${LLVM_VER}) 1
# Add current cmake/ccmake, from Kitware
RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null \
| gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null && \
apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main' && \
apt-get update -qq && \
apt-get install -y --no-install-recommends cmake cmake-curses-gui
# Cleanup cached apt data we don't need anymore
RUN apt-get clean && rm -rf /var/lib/apt/lists/*

6
configs/NuGet.Config Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<config>
<add key="repositoryPath" value="%PACKAGEHOME%" />
</config>
</configuration>

View File

@ -0,0 +1,235 @@
{
// Themes
"workbench.colorTheme": "Default Light+",
"editor.fontFamily": "'Fira Code', monospace",
"editor.fontSize": 14,
"editor.fontLigatures": true,
"editor.fontWeight": "500",
"terminal.integrated.fontFamily": "'Fira Code', monospace",
"terminal.integrated.fontSize": 12,
// "workbench.iconTheme": "",
// Git
"git.autofetch": true,
"git.enableSmartCommit": true,
"git.openRepositoryInParentFolders": "always",
"gitlens.codeLens.enabled": false,
"diffEditor.ignoreTrimWhitespace": false,
// Indentation
"editor.insertSpaces": true,
"editor.tabSize": 2,
"editor.detectIndentation": true,
// Wrapping
"editor.wordWrap": "bounded",
"editor.wrappingIndent": "same",
"editor.wordWrapColumn": 120,
// Cursor
"editor.cursorBlinking": "expand",
"editor.cursorStyle": "line-thin",
"editor.cursorSmoothCaretAnimation": "explicit",
"editor.hideCursorInOverviewRuler": false,
// Scroll
"editor.smoothScrolling": true,
"editor.minimap.enabled": false,
"editor.scrollBeyondLastLine": true,
// Gutter
"editor.folding": false,
"editor.glyphMargin": false,
// Breadcrumbs
"breadcrumbs.enabled": true,
"breadcrumbs.icons": false,
"breadcrumbs.showKeys": false,
"breadcrumbs.showFiles": false,
"breadcrumbs.symbolPath": "on",
"breadcrumbs.showArrays": true,
"breadcrumbs.showEvents": true,
"breadcrumbs.showFields": true,
"breadcrumbs.showClasses": true,
"breadcrumbs.showMethods": true,
"breadcrumbs.showBooleans": true,
"breadcrumbs.showFunctions": true,
"breadcrumbs.showConstants": true,
"breadcrumbs.showEnumMembers": true,
"breadcrumbs.showConstructors": true,
// Autosave
"files.autoSave": "onFocusChange",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"eslint.codeActionsOnSave.rules": null,
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
// Quotes
"html.completion.attributeDefaultValue": "singlequotes",
"typescript.preferences.quoteStyle": "single",
"javascript.preferences.quoteStyle": "single",
// Autocompletion
"html.autoClosingTags": true,
"javascript.autoClosingTags": true,
"typescript.autoClosingTags": true,
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"workbench.editor.empty.hint": "hidden",
"editor.gotoLocation.multipleDefinitions": "gotoAndPeek",
// Interactions
"workbench.startupEditor": "newUntitledFile",
"editor.suggestSelection": "first",
"editor.linkedEditing": true,
"editor.quickSuggestionsDelay": 0,
"explorer.confirmDragAndDrop": false,
"explorer.confirmDelete": false,
"security.workspace.trust.untrustedFiles": "open",
"editor.inlineSuggest.enabled": true,
"window.confirmBeforeClose": "keyboardOnly",
// Appearance
"editor.renderControlCharacters": false,
"editor.bracketPairColorization.enabled": true,
"editor.scrollbar.horizontal": "visible",
"editor.scrollbar.vertical": "visible",
"workbench.editor.highlightModifiedTabs": true,
"window.density.editorTabHeight": "compact",
"workbench.activityBar.location": "top",
"editor.accessibilitySupport": "off",
"window.commandCenter": false,
"workbench.layoutControl.enabled": false,
"explorer.compactFolders": false,
"workbench.editor.tabSizing": "fit",
// File associations
"workbench.editorAssociations": {
"*.ipynb": "jupyter-notebook"
},
// Frontend
"css.lint.unknownAtRules": "ignore",
"typescript.updateImportsOnFileMove.enabled": "always",
"javascript.updateImportsOnFileMove.enabled": "always",
"javascript.format.semicolons": "insert",
"typescript.format.semicolons": "insert",
"colorize.colorized_colors": ["BROWSERS_COLORS", "HEXA", "RGB", "HSL"],
// Python
"python.globalModuleInstallation": true,
"python.testing.pytestEnabled": true,
"python.testing.unittestEnabled": true,
"python.testing.cwd": "${workspaceFolder}",
"python.analysis.completeFunctionParens": true,
"[python]": {
"editor.formatOnType": true,
"editor.tabSize": 4
},
"pylint.importStrategy": "fromEnvironment",
"pylint.args": ["--extension-pkg-allowlist=pyconcept"],
"python.analysis.autoImportCompletions": true,
"python.analysis.packageIndexDepths": [
{
"name": "django",
"depth": 4
},
{
"name": "djangorestframework",
"depth": 2
}
],
"jupyter.askForKernelRestart": false,
"notebook.cellToolbarLocation": {
"default": "right",
"jupyter-notebook": "left"
},
"jupyter.interactiveWindow.creationMode": "perFile",
// Powershell
"powershell.pester.debugOutputVerbosity": "Detailed",
// CMake
"cmake.configureOnOpen": true,
"[cmake]": {},
// XML
"[xslt]": {
"editor.semanticHighlighting.enabled": true
},
// Hide folders
"files.exclude": {
"**/.next": true,
"**/node_modules": true,
"**/.mypy_cache": true,
"**/__pycache__": true,
"**/.pytest_cache": true,
"**/.coverage": true,
"**/htmlcov": true,
"**/venv": true,
"**/dist": true
},
// Spelling
"cSpell.enabled": true,
"cSpell.language": "en,ru",
"cSpell.userWords": [],
"cSpell.enableFiletypes": ["jsx", "tsx", "ts", "js", "h", "hpp", "cpp", "py"],
// Syntax Highlighting
"editor.unicodeHighlight.ambiguousCharacters": false,
"syntax.debugHover": true,
"editor.semanticTokenColorCustomizations": {
"[Default Light+]": {
"enabled": true,
"rules": {
"variable.declaration": { "bold": true },
"parameter": "#ff32f5"
}
}
},
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": "entity.name.tag",
"settings": {
"foreground": "#ac1bf0"
}
}
]
},
"syntax.highlightTerms": [
"type",
"scope",
"function",
"variable",
"number",
"string",
"comment",
"constant",
"directive",
"control",
"operator",
"modifier",
"punctuation"
],
"syntax.highlightLanguages": [
"c",
"cpp",
"python",
"typescript",
"typescriptreact",
"javascript",
"go",
"rust",
"php",
"ruby",
"shellscript",
"ocaml",
"lua"
],
"redhat.telemetry.enabled": false
}

658
configs/VSCustom.ruleset Normal file
View File

@ -0,0 +1,658 @@
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="New Rule Set" Description=" " ToolsVersion="16.0">
<Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed">
<Rule Id="CA1000" Action="Warning" />
<Rule Id="CA1001" Action="Warning" />
<Rule Id="CA1002" Action="Warning" />
<Rule Id="CA1003" Action="Warning" />
<Rule Id="CA1004" Action="Warning" />
<Rule Id="CA1005" Action="Warning" />
<Rule Id="CA1006" Action="Warning" />
<Rule Id="CA1007" Action="Warning" />
<Rule Id="CA1008" Action="Warning" />
<Rule Id="CA1009" Action="Warning" />
<Rule Id="CA1010" Action="Warning" />
<Rule Id="CA1011" Action="Warning" />
<Rule Id="CA1012" Action="Warning" />
<Rule Id="CA1013" Action="Warning" />
<Rule Id="CA1014" Action="Warning" />
<Rule Id="CA1016" Action="Warning" />
<Rule Id="CA1017" Action="Warning" />
<Rule Id="CA1018" Action="Warning" />
<Rule Id="CA1019" Action="Warning" />
<Rule Id="CA1020" Action="Warning" />
<Rule Id="CA1021" Action="Warning" />
<Rule Id="CA1023" Action="Warning" />
<Rule Id="CA1024" Action="Warning" />
<Rule Id="CA1025" Action="Warning" />
<Rule Id="CA1026" Action="Warning" />
<Rule Id="CA1027" Action="Warning" />
<Rule Id="CA1028" Action="Warning" />
<Rule Id="CA1030" Action="Warning" />
<Rule Id="CA1031" Action="Warning" />
<Rule Id="CA1032" Action="Warning" />
<Rule Id="CA1033" Action="Warning" />
<Rule Id="CA1034" Action="Warning" />
<Rule Id="CA1035" Action="Warning" />
<Rule Id="CA1036" Action="Warning" />
<Rule Id="CA1038" Action="Warning" />
<Rule Id="CA1039" Action="Warning" />
<Rule Id="CA1040" Action="Warning" />
<Rule Id="CA1041" Action="Warning" />
<Rule Id="CA1043" Action="Warning" />
<Rule Id="CA1044" Action="Warning" />
<Rule Id="CA1045" Action="Warning" />
<Rule Id="CA1046" Action="Warning" />
<Rule Id="CA1047" Action="Warning" />
<Rule Id="CA1048" Action="Warning" />
<Rule Id="CA1049" Action="Warning" />
<Rule Id="CA1050" Action="Warning" />
<Rule Id="CA1051" Action="Warning" />
<Rule Id="CA1052" Action="Warning" />
<Rule Id="CA1053" Action="Warning" />
<Rule Id="CA1054" Action="Warning" />
<Rule Id="CA1055" Action="Warning" />
<Rule Id="CA1056" Action="Warning" />
<Rule Id="CA1057" Action="Warning" />
<Rule Id="CA1058" Action="Warning" />
<Rule Id="CA1059" Action="Warning" />
<Rule Id="CA1060" Action="Warning" />
<Rule Id="CA1061" Action="Warning" />
<Rule Id="CA1062" Action="Warning" />
<Rule Id="CA1063" Action="Warning" />
<Rule Id="CA1064" Action="Warning" />
<Rule Id="CA1065" Action="Warning" />
<Rule Id="CA1300" Action="Warning" />
<Rule Id="CA1301" Action="Warning" />
<Rule Id="CA1302" Action="Warning" />
<Rule Id="CA1303" Action="Warning" />
<Rule Id="CA1304" Action="Warning" />
<Rule Id="CA1305" Action="Warning" />
<Rule Id="CA1306" Action="Warning" />
<Rule Id="CA1307" Action="Warning" />
<Rule Id="CA1308" Action="Warning" />
<Rule Id="CA1309" Action="Warning" />
<Rule Id="CA1400" Action="Warning" />
<Rule Id="CA1401" Action="Warning" />
<Rule Id="CA1402" Action="Warning" />
<Rule Id="CA1403" Action="Warning" />
<Rule Id="CA1404" Action="Warning" />
<Rule Id="CA1405" Action="Warning" />
<Rule Id="CA1406" Action="Warning" />
<Rule Id="CA1407" Action="Warning" />
<Rule Id="CA1408" Action="Warning" />
<Rule Id="CA1409" Action="Warning" />
<Rule Id="CA1410" Action="Warning" />
<Rule Id="CA1411" Action="Warning" />
<Rule Id="CA1412" Action="Warning" />
<Rule Id="CA1413" Action="Warning" />
<Rule Id="CA1414" Action="Warning" />
<Rule Id="CA1415" Action="Warning" />
<Rule Id="CA1500" Action="Warning" />
<Rule Id="CA1501" Action="Warning" />
<Rule Id="CA1502" Action="Warning" />
<Rule Id="CA1504" Action="Warning" />
<Rule Id="CA1505" Action="Warning" />
<Rule Id="CA1506" Action="Warning" />
<Rule Id="CA1600" Action="Warning" />
<Rule Id="CA1601" Action="Warning" />
<Rule Id="CA1700" Action="Warning" />
<Rule Id="CA1701" Action="Warning" />
<Rule Id="CA1702" Action="Warning" />
<Rule Id="CA1703" Action="Warning" />
<Rule Id="CA1704" Action="Warning" />
<Rule Id="CA1707" Action="Warning" />
<Rule Id="CA1708" Action="Warning" />
<Rule Id="CA1709" Action="Warning" />
<Rule Id="CA1710" Action="Warning" />
<Rule Id="CA1711" Action="Warning" />
<Rule Id="CA1712" Action="Warning" />
<Rule Id="CA1713" Action="Warning" />
<Rule Id="CA1714" Action="Warning" />
<Rule Id="CA1715" Action="Warning" />
<Rule Id="CA1716" Action="Warning" />
<Rule Id="CA1717" Action="Warning" />
<Rule Id="CA1719" Action="Warning" />
<Rule Id="CA1720" Action="Warning" />
<Rule Id="CA1721" Action="Warning" />
<Rule Id="CA1722" Action="Warning" />
<Rule Id="CA1724" Action="Warning" />
<Rule Id="CA1725" Action="Warning" />
<Rule Id="CA1726" Action="Warning" />
<Rule Id="CA1800" Action="Warning" />
<Rule Id="CA1801" Action="Warning" />
<Rule Id="CA1802" Action="Warning" />
<Rule Id="CA1804" Action="Warning" />
<Rule Id="CA1806" Action="Warning" />
<Rule Id="CA1809" Action="Warning" />
<Rule Id="CA1810" Action="Warning" />
<Rule Id="CA1811" Action="Warning" />
<Rule Id="CA1812" Action="Warning" />
<Rule Id="CA1813" Action="Warning" />
<Rule Id="CA1814" Action="Warning" />
<Rule Id="CA1815" Action="Warning" />
<Rule Id="CA1816" Action="Warning" />
<Rule Id="CA1819" Action="Warning" />
<Rule Id="CA1820" Action="Warning" />
<Rule Id="CA1821" Action="Warning" />
<Rule Id="CA1822" Action="Warning" />
<Rule Id="CA1823" Action="Warning" />
<Rule Id="CA1824" Action="Warning" />
<Rule Id="CA1900" Action="Warning" />
<Rule Id="CA1901" Action="Warning" />
<Rule Id="CA1903" Action="Warning" />
<Rule Id="CA2000" Action="Warning" />
<Rule Id="CA2001" Action="Warning" />
<Rule Id="CA2002" Action="Warning" />
<Rule Id="CA2003" Action="Warning" />
<Rule Id="CA2004" Action="Warning" />
<Rule Id="CA2006" Action="Warning" />
<Rule Id="CA2100" Action="Warning" />
<Rule Id="CA2101" Action="Warning" />
<Rule Id="CA2102" Action="Warning" />
<Rule Id="CA2103" Action="Warning" />
<Rule Id="CA2104" Action="Warning" />
<Rule Id="CA2105" Action="Warning" />
<Rule Id="CA2106" Action="Warning" />
<Rule Id="CA2107" Action="Warning" />
<Rule Id="CA2108" Action="Warning" />
<Rule Id="CA2109" Action="Warning" />
<Rule Id="CA2111" Action="Warning" />
<Rule Id="CA2112" Action="Warning" />
<Rule Id="CA2114" Action="Warning" />
<Rule Id="CA2115" Action="Warning" />
<Rule Id="CA2116" Action="Warning" />
<Rule Id="CA2117" Action="Warning" />
<Rule Id="CA2118" Action="Warning" />
<Rule Id="CA2119" Action="Warning" />
<Rule Id="CA2120" Action="Warning" />
<Rule Id="CA2121" Action="Warning" />
<Rule Id="CA2122" Action="Warning" />
<Rule Id="CA2123" Action="Warning" />
<Rule Id="CA2124" Action="Warning" />
<Rule Id="CA2126" Action="Warning" />
<Rule Id="CA2130" Action="Warning" />
<Rule Id="CA2131" Action="Warning" />
<Rule Id="CA2132" Action="Warning" />
<Rule Id="CA2133" Action="Warning" />
<Rule Id="CA2134" Action="Warning" />
<Rule Id="CA2135" Action="Warning" />
<Rule Id="CA2136" Action="Warning" />
<Rule Id="CA2137" Action="Warning" />
<Rule Id="CA2138" Action="Warning" />
<Rule Id="CA2139" Action="Warning" />
<Rule Id="CA2140" Action="Warning" />
<Rule Id="CA2141" Action="Warning" />
<Rule Id="CA2142" Action="Warning" />
<Rule Id="CA2143" Action="Warning" />
<Rule Id="CA2144" Action="Warning" />
<Rule Id="CA2145" Action="Warning" />
<Rule Id="CA2146" Action="Warning" />
<Rule Id="CA2147" Action="Warning" />
<Rule Id="CA2149" Action="Warning" />
<Rule Id="CA2151" Action="Warning" />
<Rule Id="CA2200" Action="Warning" />
<Rule Id="CA2201" Action="Warning" />
<Rule Id="CA2202" Action="Warning" />
<Rule Id="CA2204" Action="Warning" />
<Rule Id="CA2205" Action="Warning" />
<Rule Id="CA2207" Action="Warning" />
<Rule Id="CA2208" Action="Warning" />
<Rule Id="CA2210" Action="Warning" />
<Rule Id="CA2211" Action="Warning" />
<Rule Id="CA2212" Action="Warning" />
<Rule Id="CA2213" Action="Warning" />
<Rule Id="CA2214" Action="Warning" />
<Rule Id="CA2215" Action="Warning" />
<Rule Id="CA2216" Action="Warning" />
<Rule Id="CA2217" Action="Warning" />
<Rule Id="CA2218" Action="Warning" />
<Rule Id="CA2219" Action="Warning" />
<Rule Id="CA2220" Action="Warning" />
<Rule Id="CA2221" Action="Warning" />
<Rule Id="CA2222" Action="Warning" />
<Rule Id="CA2223" Action="Warning" />
<Rule Id="CA2224" Action="Warning" />
<Rule Id="CA2225" Action="Warning" />
<Rule Id="CA2226" Action="Warning" />
<Rule Id="CA2227" Action="Warning" />
<Rule Id="CA2228" Action="Warning" />
<Rule Id="CA2229" Action="Warning" />
<Rule Id="CA2230" Action="Warning" />
<Rule Id="CA2231" Action="Warning" />
<Rule Id="CA2232" Action="Warning" />
<Rule Id="CA2233" Action="Warning" />
<Rule Id="CA2234" Action="Warning" />
<Rule Id="CA2235" Action="Warning" />
<Rule Id="CA2236" Action="Warning" />
<Rule Id="CA2237" Action="Warning" />
<Rule Id="CA2238" Action="Warning" />
<Rule Id="CA2239" Action="Warning" />
<Rule Id="CA2240" Action="Warning" />
<Rule Id="CA2241" Action="Warning" />
<Rule Id="CA2242" Action="Warning" />
<Rule Id="CA2243" Action="Warning" />
<Rule Id="CA5122" Action="Warning" />
</Rules>
<Rules AnalyzerId="Microsoft.Analyzers.NativeCodeAnalysis" RuleNamespace="Microsoft.Rules.Native">
<Rule Id="C26100" Action="Warning" />
<Rule Id="C26101" Action="Warning" />
<Rule Id="C26102" Action="Warning" />
<Rule Id="C26105" Action="Warning" />
<Rule Id="C26106" Action="Warning" />
<Rule Id="C26110" Action="Warning" />
<Rule Id="C26111" Action="Warning" />
<Rule Id="C26112" Action="Warning" />
<Rule Id="C26115" Action="Warning" />
<Rule Id="C26116" Action="Warning" />
<Rule Id="C26117" Action="Warning" />
<Rule Id="C26130" Action="Warning" />
<Rule Id="C26138" Action="Warning" />
<Rule Id="C26140" Action="Warning" />
<Rule Id="C26160" Action="Warning" />
<Rule Id="C26165" Action="Warning" />
<Rule Id="C26166" Action="Warning" />
<Rule Id="C26167" Action="Warning" />
<Rule Id="C26400" Action="Warning" />
<Rule Id="C26401" Action="Warning" />
<Rule Id="C26402" Action="Warning" />
<Rule Id="C26403" Action="Warning" />
<Rule Id="C26404" Action="Warning" />
<Rule Id="C26405" Action="Warning" />
<Rule Id="C26406" Action="Warning" />
<Rule Id="C26407" Action="Warning" />
<Rule Id="C26408" Action="Warning" />
<Rule Id="C26410" Action="Warning" />
<Rule Id="C26411" Action="Warning" />
<Rule Id="C26414" Action="Warning" />
<Rule Id="C26415" Action="Warning" />
<Rule Id="C26416" Action="Warning" />
<Rule Id="C26417" Action="Warning" />
<Rule Id="C26418" Action="Warning" />
<Rule Id="C26426" Action="Warning" />
<Rule Id="C26427" Action="Warning" />
<Rule Id="C26430" Action="Warning" />
<Rule Id="C26431" Action="Warning" />
<Rule Id="C26435" Action="Warning" />
<Rule Id="C26436" Action="Warning" />
<Rule Id="C26437" Action="Warning" />
<Rule Id="C26438" Action="Warning" />
<Rule Id="C26439" Action="Warning" />
<Rule Id="C26440" Action="Warning" />
<Rule Id="C26441" Action="Warning" />
<Rule Id="C26444" Action="Warning" />
<Rule Id="C26445" Action="Warning" />
<Rule Id="C26446" Action="Warning" />
<Rule Id="C26447" Action="Warning" />
<Rule Id="C26448" Action="Warning" />
<Rule Id="C26449" Action="Warning" />
<Rule Id="C26450" Action="Warning" />
<Rule Id="C26451" Action="Warning" />
<Rule Id="C26452" Action="Warning" />
<Rule Id="C26453" Action="Warning" />
<Rule Id="C26454" Action="Warning" />
<Rule Id="C26456" Action="Warning" />
<Rule Id="C26459" Action="Warning" />
<Rule Id="C26460" Action="Warning" />
<Rule Id="C26462" Action="Warning" />
<Rule Id="C26463" Action="Warning" />
<Rule Id="C26464" Action="Warning" />
<Rule Id="C26465" Action="Warning" />
<Rule Id="C26466" Action="Warning" />
<Rule Id="C26471" Action="Warning" />
<Rule Id="C26473" Action="Warning" />
<Rule Id="C26474" Action="Warning" />
<Rule Id="C26475" Action="Warning" />
<Rule Id="C26476" Action="Warning" />
<Rule Id="C26481" Action="Warning" />
<Rule Id="C26482" Action="Warning" />
<Rule Id="C26483" Action="Warning" />
<Rule Id="C26485" Action="Warning" />
<Rule Id="C26491" Action="Warning" />
<Rule Id="C26492" Action="Warning" />
<Rule Id="C26493" Action="Warning" />
<Rule Id="C26494" Action="Warning" />
<Rule Id="C26495" Action="Warning" />
<Rule Id="C26496" Action="Warning" />
<Rule Id="C26497" Action="Warning" />
<Rule Id="C26498" Action="Warning" />
<Rule Id="C26800" Action="Warning" />
<Rule Id="C26810" Action="Warning" />
<Rule Id="C26811" Action="Warning" />
<Rule Id="C28020" Action="Warning" />
<Rule Id="C28021" Action="Warning" />
<Rule Id="C28022" Action="Warning" />
<Rule Id="C28023" Action="Warning" />
<Rule Id="C28024" Action="Warning" />
<Rule Id="C28039" Action="Warning" />
<Rule Id="C28101" Action="Warning" />
<Rule Id="C28103" Action="Warning" />
<Rule Id="C28104" Action="Warning" />
<Rule Id="C28105" Action="Warning" />
<Rule Id="C28106" Action="Warning" />
<Rule Id="C28107" Action="Warning" />
<Rule Id="C28108" Action="Warning" />
<Rule Id="C28109" Action="Warning" />
<Rule Id="C28110" Action="Warning" />
<Rule Id="C28111" Action="Warning" />
<Rule Id="C28112" Action="Warning" />
<Rule Id="C28113" Action="Warning" />
<Rule Id="C28114" Action="Warning" />
<Rule Id="C28120" Action="Warning" />
<Rule Id="C28121" Action="Warning" />
<Rule Id="C28122" Action="Warning" />
<Rule Id="C28123" Action="Warning" />
<Rule Id="C28124" Action="Warning" />
<Rule Id="C28125" Action="Warning" />
<Rule Id="C28126" Action="Warning" />
<Rule Id="C28127" Action="Warning" />
<Rule Id="C28128" Action="Warning" />
<Rule Id="C28129" Action="Warning" />
<Rule Id="C28131" Action="Warning" />
<Rule Id="C28132" Action="Warning" />
<Rule Id="C28133" Action="Warning" />
<Rule Id="C28134" Action="Warning" />
<Rule Id="C28135" Action="Warning" />
<Rule Id="C28137" Action="Warning" />
<Rule Id="C28138" Action="Warning" />
<Rule Id="C28141" Action="Warning" />
<Rule Id="C28143" Action="Warning" />
<Rule Id="C28144" Action="Warning" />
<Rule Id="C28145" Action="Warning" />
<Rule Id="C28146" Action="Warning" />
<Rule Id="C28147" Action="Warning" />
<Rule Id="C28150" Action="Warning" />
<Rule Id="C28151" Action="Warning" />
<Rule Id="C28152" Action="Warning" />
<Rule Id="C28153" Action="Warning" />
<Rule Id="C28156" Action="Warning" />
<Rule Id="C28157" Action="Warning" />
<Rule Id="C28158" Action="Warning" />
<Rule Id="C28159" Action="Warning" />
<Rule Id="C28160" Action="Warning" />
<Rule Id="C28161" Action="Warning" />
<Rule Id="C28162" Action="Warning" />
<Rule Id="C28163" Action="Warning" />
<Rule Id="C28164" Action="Warning" />
<Rule Id="C28165" Action="Warning" />
<Rule Id="C28166" Action="Warning" />
<Rule Id="C28167" Action="Warning" />
<Rule Id="C28168" Action="Warning" />
<Rule Id="C28169" Action="Warning" />
<Rule Id="C28170" Action="Warning" />
<Rule Id="C28171" Action="Warning" />
<Rule Id="C28172" Action="Warning" />
<Rule Id="C28173" Action="Warning" />
<Rule Id="C28175" Action="Warning" />
<Rule Id="C28176" Action="Warning" />
<Rule Id="C28182" Action="Warning" />
<Rule Id="C28183" Action="Warning" />
<Rule Id="C28193" Action="Warning" />
<Rule Id="C28194" Action="Warning" />
<Rule Id="C28195" Action="Warning" />
<Rule Id="C28196" Action="Warning" />
<Rule Id="C28197" Action="Warning" />
<Rule Id="C28198" Action="Warning" />
<Rule Id="C28199" Action="Warning" />
<Rule Id="C28202" Action="Warning" />
<Rule Id="C28203" Action="Warning" />
<Rule Id="C28204" Action="Warning" />
<Rule Id="C28205" Action="Warning" />
<Rule Id="C28206" Action="Warning" />
<Rule Id="C28207" Action="Warning" />
<Rule Id="C28208" Action="Warning" />
<Rule Id="C28209" Action="Warning" />
<Rule Id="C28210" Action="Warning" />
<Rule Id="C28211" Action="Warning" />
<Rule Id="C28212" Action="Warning" />
<Rule Id="C28213" Action="Warning" />
<Rule Id="C28214" Action="Warning" />
<Rule Id="C28215" Action="Warning" />
<Rule Id="C28216" Action="Warning" />
<Rule Id="C28217" Action="Warning" />
<Rule Id="C28218" Action="Warning" />
<Rule Id="C28219" Action="Warning" />
<Rule Id="C28220" Action="Warning" />
<Rule Id="C28221" Action="Warning" />
<Rule Id="C28222" Action="Warning" />
<Rule Id="C28223" Action="Warning" />
<Rule Id="C28224" Action="Warning" />
<Rule Id="C28225" Action="Warning" />
<Rule Id="C28226" Action="Warning" />
<Rule Id="C28227" Action="Warning" />
<Rule Id="C28228" Action="Warning" />
<Rule Id="C28229" Action="Warning" />
<Rule Id="C28230" Action="Warning" />
<Rule Id="C28231" Action="Warning" />
<Rule Id="C28232" Action="Warning" />
<Rule Id="C28233" Action="Warning" />
<Rule Id="C28234" Action="Warning" />
<Rule Id="C28235" Action="Warning" />
<Rule Id="C28236" Action="Warning" />
<Rule Id="C28237" Action="Warning" />
<Rule Id="C28238" Action="Warning" />
<Rule Id="C28239" Action="Warning" />
<Rule Id="C28240" Action="Warning" />
<Rule Id="C28241" Action="Warning" />
<Rule Id="C28243" Action="Warning" />
<Rule Id="C28244" Action="Warning" />
<Rule Id="C28245" Action="Warning" />
<Rule Id="C28246" Action="Warning" />
<Rule Id="C28250" Action="Warning" />
<Rule Id="C28251" Action="Warning" />
<Rule Id="C28252" Action="Warning" />
<Rule Id="C28253" Action="Warning" />
<Rule Id="C28254" Action="Warning" />
<Rule Id="C28260" Action="Warning" />
<Rule Id="C28262" Action="Warning" />
<Rule Id="C28263" Action="Warning" />
<Rule Id="C28266" Action="Warning" />
<Rule Id="C28267" Action="Warning" />
<Rule Id="C28272" Action="Warning" />
<Rule Id="C28273" Action="Warning" />
<Rule Id="C28275" Action="Warning" />
<Rule Id="C28278" Action="Warning" />
<Rule Id="C28279" Action="Warning" />
<Rule Id="C28280" Action="Warning" />
<Rule Id="C28282" Action="Warning" />
<Rule Id="C28283" Action="Warning" />
<Rule Id="C28284" Action="Warning" />
<Rule Id="C28285" Action="Warning" />
<Rule Id="C28286" Action="Warning" />
<Rule Id="C28287" Action="Warning" />
<Rule Id="C28288" Action="Warning" />
<Rule Id="C28289" Action="Warning" />
<Rule Id="C28290" Action="Warning" />
<Rule Id="C28291" Action="Warning" />
<Rule Id="C28300" Action="Warning" />
<Rule Id="C28301" Action="Warning" />
<Rule Id="C28302" Action="Warning" />
<Rule Id="C28303" Action="Warning" />
<Rule Id="C28304" Action="Warning" />
<Rule Id="C28305" Action="Warning" />
<Rule Id="C28306" Action="Warning" />
<Rule Id="C28307" Action="Warning" />
<Rule Id="C28308" Action="Warning" />
<Rule Id="C28309" Action="Warning" />
<Rule Id="C28350" Action="Warning" />
<Rule Id="C28351" Action="Warning" />
<Rule Id="C28601" Action="Warning" />
<Rule Id="C28602" Action="Warning" />
<Rule Id="C28604" Action="Warning" />
<Rule Id="C28615" Action="Warning" />
<Rule Id="C28616" Action="Warning" />
<Rule Id="C28617" Action="Warning" />
<Rule Id="C28623" Action="Warning" />
<Rule Id="C28624" Action="Warning" />
<Rule Id="C28625" Action="Warning" />
<Rule Id="C28636" Action="Warning" />
<Rule Id="C28637" Action="Warning" />
<Rule Id="C28638" Action="Warning" />
<Rule Id="C28639" Action="Warning" />
<Rule Id="C28640" Action="Warning" />
<Rule Id="C28645" Action="Warning" />
<Rule Id="C28648" Action="Warning" />
<Rule Id="C28649" Action="Warning" />
<Rule Id="C28650" Action="Warning" />
<Rule Id="C28714" Action="Warning" />
<Rule Id="C28715" Action="Warning" />
<Rule Id="C28716" Action="Warning" />
<Rule Id="C28717" Action="Warning" />
<Rule Id="C28719" Action="Warning" />
<Rule Id="C28720" Action="Warning" />
<Rule Id="C28721" Action="Warning" />
<Rule Id="C28726" Action="Warning" />
<Rule Id="C28727" Action="Warning" />
<Rule Id="C28730" Action="Warning" />
<Rule Id="C28735" Action="Warning" />
<Rule Id="C28736" Action="Warning" />
<Rule Id="C28750" Action="Warning" />
<Rule Id="C28751" Action="Warning" />
<Rule Id="C6001" Action="Warning" />
<Rule Id="C6011" Action="Warning" />
<Rule Id="C6014" Action="Warning" />
<Rule Id="C6029" Action="Warning" />
<Rule Id="C6031" Action="Warning" />
<Rule Id="C6053" Action="Warning" />
<Rule Id="C6054" Action="Warning" />
<Rule Id="C6059" Action="Warning" />
<Rule Id="C6063" Action="Warning" />
<Rule Id="C6064" Action="Warning" />
<Rule Id="C6066" Action="Warning" />
<Rule Id="C6067" Action="Warning" />
<Rule Id="C6101" Action="Warning" />
<Rule Id="C6200" Action="Warning" />
<Rule Id="C6201" Action="Warning" />
<Rule Id="C6211" Action="Warning" />
<Rule Id="C6214" Action="Warning" />
<Rule Id="C6215" Action="Warning" />
<Rule Id="C6216" Action="Warning" />
<Rule Id="C6217" Action="Warning" />
<Rule Id="C6219" Action="Warning" />
<Rule Id="C6220" Action="Warning" />
<Rule Id="C6221" Action="Warning" />
<Rule Id="C6225" Action="Warning" />
<Rule Id="C6226" Action="Warning" />
<Rule Id="C6230" Action="Warning" />
<Rule Id="C6235" Action="Warning" />
<Rule Id="C6236" Action="Warning" />
<Rule Id="C6237" Action="Warning" />
<Rule Id="C6239" Action="Warning" />
<Rule Id="C6240" Action="Warning" />
<Rule Id="C6242" Action="Warning" />
<Rule Id="C6244" Action="Warning" />
<Rule Id="C6246" Action="Warning" />
<Rule Id="C6248" Action="Warning" />
<Rule Id="C6250" Action="Warning" />
<Rule Id="C6255" Action="Warning" />
<Rule Id="C6258" Action="Warning" />
<Rule Id="C6259" Action="Warning" />
<Rule Id="C6260" Action="Warning" />
<Rule Id="C6262" Action="Warning" />
<Rule Id="C6263" Action="Warning" />
<Rule Id="C6268" Action="Warning" />
<Rule Id="C6269" Action="Warning" />
<Rule Id="C6270" Action="Warning" />
<Rule Id="C6271" Action="Warning" />
<Rule Id="C6272" Action="Warning" />
<Rule Id="C6273" Action="Warning" />
<Rule Id="C6274" Action="Warning" />
<Rule Id="C6276" Action="Warning" />
<Rule Id="C6277" Action="Warning" />
<Rule Id="C6278" Action="Warning" />
<Rule Id="C6279" Action="Warning" />
<Rule Id="C6280" Action="Warning" />
<Rule Id="C6281" Action="Warning" />
<Rule Id="C6282" Action="Warning" />
<Rule Id="C6283" Action="Warning" />
<Rule Id="C6284" Action="Warning" />
<Rule Id="C6285" Action="Warning" />
<Rule Id="C6286" Action="Warning" />
<Rule Id="C6287" Action="Warning" />
<Rule Id="C6288" Action="Warning" />
<Rule Id="C6289" Action="Warning" />
<Rule Id="C6290" Action="Warning" />
<Rule Id="C6291" Action="Warning" />
<Rule Id="C6292" Action="Warning" />
<Rule Id="C6293" Action="Warning" />
<Rule Id="C6294" Action="Warning" />
<Rule Id="C6295" Action="Warning" />
<Rule Id="C6296" Action="Warning" />
<Rule Id="C6297" Action="Warning" />
<Rule Id="C6298" Action="Warning" />
<Rule Id="C6299" Action="Warning" />
<Rule Id="C6302" Action="Warning" />
<Rule Id="C6303" Action="Warning" />
<Rule Id="C6305" Action="Warning" />
<Rule Id="C6306" Action="Warning" />
<Rule Id="C6308" Action="Warning" />
<Rule Id="C6310" Action="Warning" />
<Rule Id="C6312" Action="Warning" />
<Rule Id="C6313" Action="Warning" />
<Rule Id="C6314" Action="Warning" />
<Rule Id="C6315" Action="Warning" />
<Rule Id="C6316" Action="Warning" />
<Rule Id="C6317" Action="Warning" />
<Rule Id="C6318" Action="Warning" />
<Rule Id="C6319" Action="Warning" />
<Rule Id="C6320" Action="Warning" />
<Rule Id="C6322" Action="Warning" />
<Rule Id="C6323" Action="Warning" />
<Rule Id="C6324" Action="Warning" />
<Rule Id="C6326" Action="Warning" />
<Rule Id="C6328" Action="Warning" />
<Rule Id="C6329" Action="Warning" />
<Rule Id="C6330" Action="Warning" />
<Rule Id="C6331" Action="Warning" />
<Rule Id="C6332" Action="Warning" />
<Rule Id="C6333" Action="Warning" />
<Rule Id="C6334" Action="Warning" />
<Rule Id="C6335" Action="Warning" />
<Rule Id="C6336" Action="Warning" />
<Rule Id="C6340" Action="Warning" />
<Rule Id="C6381" Action="Warning" />
<Rule Id="C6383" Action="Warning" />
<Rule Id="C6384" Action="Warning" />
<Rule Id="C6385" Action="Warning" />
<Rule Id="C6386" Action="Warning" />
<Rule Id="C6387" Action="Warning" />
<Rule Id="C6388" Action="Warning" />
<Rule Id="C6400" Action="Warning" />
<Rule Id="C6401" Action="Warning" />
<Rule Id="C6411" Action="Warning" />
<Rule Id="C6412" Action="Warning" />
<Rule Id="C6500" Action="Warning" />
<Rule Id="C6501" Action="Warning" />
<Rule Id="C6503" Action="Warning" />
<Rule Id="C6504" Action="Warning" />
<Rule Id="C6505" Action="Warning" />
<Rule Id="C6506" Action="Warning" />
<Rule Id="C6508" Action="Warning" />
<Rule Id="C6509" Action="Warning" />
<Rule Id="C6510" Action="Warning" />
<Rule Id="C6511" Action="Warning" />
<Rule Id="C6513" Action="Warning" />
<Rule Id="C6514" Action="Warning" />
<Rule Id="C6515" Action="Warning" />
<Rule Id="C6516" Action="Warning" />
<Rule Id="C6517" Action="Warning" />
<Rule Id="C6518" Action="Warning" />
<Rule Id="C6522" Action="Warning" />
<Rule Id="C6525" Action="Warning" />
<Rule Id="C6527" Action="Warning" />
<Rule Id="C6530" Action="Warning" />
<Rule Id="C6540" Action="Warning" />
<Rule Id="C6551" Action="Warning" />
<Rule Id="C6552" Action="Warning" />
<Rule Id="C6701" Action="Warning" />
<Rule Id="C6702" Action="Warning" />
<Rule Id="C6703" Action="Warning" />
<Rule Id="C6704" Action="Warning" />
<Rule Id="C6705" Action="Warning" />
<Rule Id="C6706" Action="Warning" />
<Rule Id="C6707" Action="Warning" />
<Rule Id="C6993" Action="Warning" />
<Rule Id="C6995" Action="Warning" />
<Rule Id="C6997" Action="Warning" />
</Rules>
</RuleSet>

View File

@ -0,0 +1,4 @@
{
"PythonInterpreter": "python"
"PythonImports": "D:\\DEV\\!WORK\\PyRunner\\src"
}

29
configs/native.clang-tidy Normal file
View File

@ -0,0 +1,29 @@
Checks: "*,\
-llvmlibc-callee-namespace,\
-llvmlibc-restrict-system-libc-headers,\
-llvm-else-after-return,\
-bugprone-branch-clone,\
-bugprone-suspicious-include,\
-modernize-use-trailing-return-type,\
-hicpp-special-member-functions,\
-llvm-header-guard,\
-google-runtime-references,\
-llvm-include-order,\
-fuchsia-overloaded-operator,\
-fuchsia-default-arguments,\
-google-readability-todo,\
-google-global-names-in-headers,\
-readability-redundant-access-specifiers,\
-readability-else-after-return,\
-readability-implicit-bool-conversion,\
-readability-use-anyofallof,\
-performance-inefficient-string-concatenation,\
-performance-unnecessary-value-param,\
-fuchsia-default-arguments-declarations,\
-fuchsia-trailing-return,\
-fuchsia-multiple-inheritance,\
-fuchsia-default-arguments-calls,\
-misc-non-private-member-variables-in-classes,\
-misc-no-recursion,\
-cppcoreguidelines-special-member-functions,\
-cppcoreguidelines-non-private-member-variables-in-classes"

View File

@ -0,0 +1,22 @@
{
"python.testing.unittestArgs": [
"-v",
"-s",
"./tests",
"-p",
"test*.py"
],
"python.testing.pytestEnabled": false,
"python.testing.unittestEnabled": true,
"python.linting.pylintEnabled": true,
"python.linting.enabled": true
"python.linting.pylintArgs": [
"--max-line-length=120",
"--disable=invalid-name",
"--disable=line-too-long",
"--disable=no-else-return",
"--disable=too-many-return-statements",
"--disable=no-else-break",
"--disable=no-else-continue"
]
}

43
configs/win32.clang-tidy Normal file
View File

@ -0,0 +1,43 @@
Checks: "*,\
-llvmlibc-implementation-in-namespace,\
-llvmlibc-callee-namespace,\
-llvmlibc-restrict-system-libc-headers,\
-llvm-else-after-return,\
-bugprone-branch-clone,\
-bugprone-suspicious-include,\
-modernize-use-trailing-return-type,\
-modernize-avoid-c-arrays,\
-hicpp-special-member-functions,\
-hicpp-multiway-paths-covered,\
-hicpp-signed-bitwise,\
-hicpp-avoid-c-arrays,\
-hicpp-vararg,\
-llvm-header-guard,\
-google-runtime-references,\
-google-runtime-int,\
-llvm-include-order,\
-fuchsia-overloaded-operator,\
-fuchsia-default-arguments,\
-google-readability-todo,\
-google-global-names-in-headers,\
-readability-redundant-access-specifiers,\
-readability-else-after-return,\
-readability-implicit-bool-conversion,\
-readability-use-anyofallof,\
-performance-no-int-to-ptr,\
-performance-inefficient-string-concatenation,\
-performance-unnecessary-value-param,\
-fuchsia-default-arguments-declarations,\
-fuchsia-trailing-return,\
-fuchsia-multiple-inheritance,\
-fuchsia-default-arguments-calls,\
-misc-non-private-member-variables-in-classes,\
-misc-no-recursion,\
-cppcoreguidelines-pro-type-union-access,\
-cppcoreguidelines-pro-type-reinterpret-cast,\
-cppcoreguidelines-macro-usage,\
-cppcoreguidelines-pro-type-vararg,\
-cppcoreguidelines-special-member-functions,\
-cppcoreguidelines-avoid-c-arrays,\
-cppcoreguidelines-pro-type-cstyle-cast,\
-cppcoreguidelines-non-private-member-variables-in-classes"

3
devops/SETUP GITEA.txt Normal file
View File

@ -0,0 +1,3 @@
https://docs.gitea.com/installation/install-with-docker-rootless
sudo docker-compose up -d

View File

@ -0,0 +1,57 @@
IP сервера: 77.232.136.118
# ------ SETUP PROD SERVER ---------
# 1. ======== SSH AS ROOT ==========
apt update && apt install docker.io -y
groupadd docker
adduser prod
usermod -aG sudo prod
usermod -aG docker prod
su - prod
# 2. ====== SSH AS PROD USER ==========
mkdir backup portal
cd portal
git clone https://github.com/IRBorisov/ConceptPortal ./
mkdir secretes
# 3. ====== WINDOWS =========
scp D:\DEV\WORK\Concept-Web\rsconcept\backend\import\pyconcept-1.3.0-cp310-cp310-linux_x86_64.whl prod@77.232.136.118:~/portal/rsconcept/backend/import/pyconcept-1.3.0-cp310-cp310-linux_x86_64.whl
scp -r D:\DEV\WORK\Concept-Web\secrets prod@77.232.136.118:~/portal/secrets
# 4. ======= SSH AS PROD USER =======
cd ~/protal
bash scripts/prod/UpdateProd.sh
# 5. For Initial certbot startup we need to temporarily edit nginx config to prevent it from failing to load them
nano nginx/production.conf
# Remove all HTTPS sections (listen 443)
docker compose -f "docker-compose-prod.yml" up --build -d
docker logs -t portal-router
# Make sure that router logs do not contain errors
# 6. Get cerificates first time
docker compose -f "docker-compose-prod.yml" run --rm certbot certonly --webroot --webroot-path /var/www/certbot/ --dry-run -d portal.acconcept.ru -d api.portal.acconcept.ru
> email: portal@acconcept.ru
# Should result in "The dry run was successful.
docker compose -f "docker-compose-prod.yml" run --rm certbot certonly --webroot --webroot-path /var/www/certbot/ -d portal.acconcept.ru
docker compose -f "docker-compose-prod.yml" run --rm certbot certonly --webroot --webroot-path /var/www/certbot/ -d api.portal.acconcept.ru
# Should result in "Successfully received certificate"
# 7. Setup nginx using certs
git checkout HEAD -- nginx/production.conf
docker compose -f "docker-compose-prod.yml" up --build -d
# 8. Setup Initial data
docker exec -it portal-backend /bin/bash
python manage.py createsuperuser
python manage.py loaddata fixtures/InitialData.json
# OR restore backup from pg_dump
docker exec -i portal-db pg_restore --username=portal-admin --dbname=portal-db --clean < ~/restore/2023-09-18-db.dump

View File

@ -0,0 +1,54 @@
# NOTE: Server IP = 172.22.1.2 // ssh admuser@192.168.1.249
# VPN CONNECTION REQUIRED
======== System ===========
Install Ubuntu
sudo apt full-upgrade
sudo apt-get upgrade
sudo apt-get update
sudo timedatectl set-timezone Europe/Moscow
Setup en_US locale
https://www.thomas-krenn.com/en/wiki/Configure_Locales_in_Ubuntu
sudo apt install zip unzip
======== GIT ==============
Add git user and setup git repos server
https://git-scm.com/book/ru/v1/Git-%D0%BD%D0%B0-%D1%81%D0%B5%D1%80%D0%B2%D0%B5%D1%80%D0%B5-%D0%9D%D0%B0%D1%81%D1%82%D1%80%D0%B0%D0%B8%D0%B2%D0%B0%D0%B5%D0%BC-%D1%81%D0%B5%D1%80%D0%B2%D0%B5%D1%80
Import git repositories
https://gist.github.com/niksumeiko/8972566
Update submodule links between repos
http://pa1gitsolutions.blogspot.com/2015/07/changing-git-submodules-urlbranch-to.html
======== Jenkins ===========
1. Install Java, Jenkins, Apache server, UFW Firewall
https://www.digitalocean.com/community/tutorials/how-to-install-jenkins-on-ubuntu-20-04-ru
wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt install jenkins
sudo ufw allow 8080
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
2. Use Internet browser to connect to http://172.22.1.2:8080/
3. Jenkins Plugins: Folders OWASP Markup Formatter Build Timeout Credentials Binding Timestamper Workspace Cleanup Pipeline Pipeline: Stage View Git SSH Build Agents Email Extension Mailer Dashboard View MSBuild Cobertura Warnings Next Generation Multijob Copy Artifact SSH Agent Active Directory Publish Over SSH Locale
4. Setup network DNS to alias jenkins URL
5. Configure Jenkins Master and Slave
https://www.howtoforge.com/tutorial/ubuntu-jenkins-master-slave
6. Jenkins: Subverion Version Number
To control this behavior with Jenkins go to Manage Jenkins -> Configure System -> Subversion and configure the Subversion Workspace Version to 1.6 from the combo box (by default it is set to oldest version - 1.4).
https://stackoverflow.com/questions/11872313/svn-is-not-under-version-control-failure-with-jenkins
7. Configure and connect Jenkins agents
Use JNLP to connect Windows slave. Might require network adjustm
https://scmquest.com/jenkins-windows-slave-configuration-with-screenshots/

View File

@ -0,0 +1,39 @@
======= gcc-10 =======
sudo apt install g++-10
https://askubuntu.com/questions/1028601/install-gcc-8-only-on-ubuntu-18-04
https://linuxize.com/post/how-to-install-gcc-compiler-on-ubuntu-18-04/
======= clang-11 =======
sudo wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
sudo apt-add-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-11 main"
sudo apt-get install clang-11 lldb-11 lld-11
======= CMake ===============
sudo apt-get install cmake
# or build desired version from source
# https://askubuntu.com/questions/355565/how-do-i-install-the-latest-version-of-cmake-from-the-command-line
==== Python =====
sudo apt install python3-pip
======== Conan ===========
sudo pip3 install conan
FIX CMAKE NOT DOWNLOADING HTTPS: https://github.com/libigl/libigl/issues/1019
sudo apt install libcurl4-openssl-dev (or another dev package for cURL with TLS support)
Download cmake source and change to unpacked directory
./bootstrap --system-curl -- -DCMAKE_BUILD_TYPE:STRING=Release
make
make install
----------------------------------------
========== DEPRECATED DEPENDENCIES =====
========= might reintroduce in future ====
-----------------------------------------
======= boost =======
from source
https://stackoverflow.com/questions/12578499/how-to-install-boost-on-ubuntu

View File

@ -0,0 +1,38 @@
Setup SSH for client
1. Enable Windows SSH Agent service
2. ssh-keygen -t ecdsa -b 521
# VERY IMPORTANT TO GENERATE ECDSA KEY:
# https://github.com/PowerShell/Win32-OpenSSH/issues/1263#issuecomment-716215121
3. ssh-add FILENAME
# If needed remove old keys with ssh-add -D
4. Setup GIT to use native ssh:
git config --global core.sshCommand "'C:\Windows\System32\OpenSSH\ssh.exe'"
5. Add public key to server authorized_keys
https://stackoverflow.com/questions/31813080/windows-10-ssh-keys
- Visual Studio
- vcpkg
- vcpkg install poco:x86-windows-static-md // see https://levelup.gitconnected.com/how-to-statically-link-c-libraries-with-vcpkg-visual-studio-2019-435c2d4ace03
- vcpkg install poco:x64-windows-static-md
- PATH (for lib.exe)
- HTML Help Workshop + PATH
- CMake 3.14+, PATH
- OpenCppCoverage, PATH
- MSBuild, PATH
- Git PATH
- nuget.exe, PATH
- setup %PACKAGEHOME% system variable pointing to folder for storing shared nuget packages
- 7zip, PATH
- Python 3.9 - INSTALL WITH DEBUG LIBRARIES!
- python -m pip install --upgrade pip
- pip install conan
- setup CONAN_USER_HOME
- pip install nose
- pip install coverage
- winflexbison3 https://sourceforge.net/projects/winflexbison/files/ + PATH
- reflex https://github.com/Genivia/RE-flex + PATH

View File

@ -0,0 +1,14 @@
0. Setup windows build
1. Vistual Studio
2. VS Extensions
- Fix File Encoding
- Clang Power Tools
- GitHub Extension
- GitExtensions
- VS Intellicode
- Test Adapter for Google Test
- Syntax Highlighting Pack
Setup SSH Agent and keys
https://stackoverflow.com/questions/18683092/how-to-run-ssh-add-on-windows
https://vladmihalcea.com/tutorials/git/windows-git-ssh-authentication-to-github/

90
devops/prod commands.txt Normal file
View File

@ -0,0 +1,90 @@
ssh prod@77.232.136.118
bash scripts/prod/UpdateProd.sh
docker compose -f "docker-compose-prod.yml" restart
sudo apt-get full-upgrade
sudo nano /etc/docker/daemon.json
python -m smtpd -n -c DebuggingServer localhost:1025
npm update --save
venv\Scripts\activate
python -m pip install cctext==0.1.2
pip freeze -r requirements.txt
scp -r prod@77.232.136.118:~/backup/* E:\Google\!WORK\backup\
scp -r D:\DEV\WORK\Concept-Web\secrets\* prod@77.232.136.118:~/portal/secrets/
zabbix
Grafana
ELK
docker *** ls
docker compose -f "docker-compose-prod.yml" up --build -d
docker run --rm -it --entrypoint /bin/bash image_name
# Nuke all except volumes and running containers
docker system prune -a
docker container prune
docker image prune --all
docker volume prune --all
# Create Superuser
python manage.py createsuperuser
# Django data
-Xutf8
python -Xutf8 manage.py dumpdata rsform --indent 2 -o fixtures/InitialData.json
python manage.py loaddata fixtures/InitialData.json
./manage.py migrate --fake
# Connect to container
docker exec -it <container name> /bin/bash
Ctrl + D = exit
# connect to stopped container
docker run --rm -it --entrypoint /bin/bash concept-core-builder
docker logs -t [OPTIONS] CONTAINER
# Check memory usage
sudo df -h --total
# Certificates CERTBOT
sudo apt install certbot python3-certbot-nginx
sudo certbot --nginx -d portal.acconcept.ru
docker compose -f "docker-compose-prod.yml" run --rm
certbot certonly --webroot --webroot-path /var/www/certbot/ -d portal.acconcept.ru api.portal.acconcept.ru
docker compose -f "docker-compose-prod.yml" run --rm certbot renew
#chkmk monitoring
https://checkmk.com/download?method=docker&edition=cre&version=2.2.0p8
docker container run -dit -p 8080:5000 -p 8000:8000 --tmpfs /opt/omd/sites/cmk/tmp:uid=1000,gid=1000 -v monitoring:/omd/sites --name monitoring -v /etc/localtime:/etc/localtime:ro --restart always checkmk/check-mk-raw:2.2.0p8
# check container logs
docker container logs portal-backend
#DB
pg_dump -U <db_username> <db_name> -h <host> -t <table_name> > exported_data.sql
docker exec -t container pg_dump ... > dump.sql
cat dump.sql | docker exec -i container psql ...
docker exec <container-name> pg_dump -U <mydbUser> -F t <mydbName> > mydb.tar
docker cp mydb.tar <container-name>:/
pg_restore -U <mydbUser> -C -d <mydbName> mydb.tar
pg_restore --verbose --clean --no-acl --no-owner -h
# Fix ubuntu repo
https://www.oslogic.ru/knowledge/1540/ispravlyaem-key-is-stored-in-legacy-trusted-gpg-keyring-etc-apt-trusted-gpg/

View File

@ -0,0 +1,15 @@
cmake_minimum_required(VERSION 3.12)
project(googletest-download LANGUAGES CXX)
include(ExternalProject)
ExternalProject_Add(googletest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG master
SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-src"
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-build"
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
TEST_COMMAND ""
)

View File

@ -0,0 +1,19 @@
cd REPO
mkdir out
cd out
FOR /F "tokens=*" %%A IN (../../repos.txt) DO (call :subroutine "%%A")
PAUSE
GOTO :eof
:subroutine
git clone ../%1
cd %1
git remote rm origin
git remote add origin git@repo:/var/repos/%1.git
git config master.remote origin
git config master.merge refs/heads/master
git push -u origin master
cd ..
GOTO :eof

View File

@ -0,0 +1,3 @@
OpenCppCoverage --sources "%~dp0src" --sources "%~dp0header" --sources "%~dp0include" --modules "%~dp0build\Debug\ConceptCoreLibraryd.lib" --modules "%~dp0test\build\Debug\cclTest.exe" --excluded_line_regex "\s*\} else \{.*" --excluded_line_regex "\s*\}\s*" --excluded_line_regex "\s*\sthrow *" --excluded_line_regex "\sassert\(.*" --excluded_sources "rsparserimpl.cpp" --excluded_sources "rsparserimpl.y" --excluded_sources "stack.hh" -- %~dp0test\build\Debug\CCLTest.exe
pause

View File

@ -0,0 +1,26 @@
https://github.com/google/benchmark
git clone https://github.com/google/benchmark.git
git clone https://github.com/google/googletest.git benchmark/googletest
mkdir build && cd build
cmake ../ -G "Visual Studio 2019" -A "Win32"
Открыть BUILD_ALL.sln и далее скомпилить Release и Debug
Скопировать из build/src/Release либы в lib/Win32/Release
аналогично Debug
------------------
git clone https://github.com/google/benchmark.git
git clone https://github.com/google/googletest.git benchmark/googletest
cmake -E make_directory "build"
cmake -E chdir "build" cmake -DCMAKE_BUILD_TYPE=Release ../
# or use this to auto download googletest:
# cmake -E chdir "build" cmake -DBENCHMARK_DOWNLOAD_DEPENDENCIES=TRUE, -DCMAKE_BUILD_TYPE=Release ../
cmake --build "build" --config Release
# copy result from build\src\Release into lib folder (i.t. lib\x64\Release)
# repeat for --config Debug and -A Win32

8
devops/windows tools.txt Normal file
View File

@ -0,0 +1,8 @@
1. Dependencies - analyse dependencies for dll and exe
# helps with Critical error "the application was unable to start correctly 0xc00007b"
2. LongPathTool - deal with windows paths > 260 symbols
3. WinSpy64 - analyze open windows
4. ProcessExplorer - analyze open processes

54
git.txt Normal file
View File

@ -0,0 +1,54 @@
0. Add new repository to Ubuntu server
cd /var/repos
mkdir Name.git
cd Name.git
git init --bare
cd ..
sudo chown -R git Name.git
sudo chmod -R a+rwx /var/repos
1. Move a bunch of files through git mv
for FILE in src/*.h; do git mv $FILE include/; done
2. Submodules
https://git-scm.com/docs/git-submodule
git submodule update --init --recursive --remote
git config submodule.moduleName.url git@repo:/var/repos/common/CodeStandard.git
3. Remove submodule
https://gist.github.com/myusuf3/7f645819ded92bda6677
4. Move files with history into another repo
https://medium.com/@ayushya/move-directory-from-one-repository-to-another-preserving-git-history-d210fa049d4b
5. Change origin
git remote rm origin
git remote add origin git@repo:/var/repos/CodeStandard.git
git config master.remote origin
git config master.merge refs/heads/master
6. Push commits to remote (origin)
git push -u origin master
7. move files with history
https://gbayer.com/development/moving-files-from-one-git-repository-to-another-preserving-history/
git filter-branch --subdirectory-filter <directory 1> -- --all
git pull repo-A-branch master --allow-unrelated-histories
8. Remove history for inactive files = delete all and restore active
https://stackoverflow.com/questions/17901588/new-repo-with-copied-history-of-only-currently-tracked-files
$ git checkout master
$ git ls-files > keep-these.txt
$ git filter-branch --force --index-filter \
"git rm --ignore-unmatch --cached -qr . ; \
cat $PWD/keep-these.txt | tr '\n' '\0' | xargs -d '\0' git reset -q \$GIT_COMMIT --" \
--prune-empty --tag-name-filter cat -- --all
$ rm -rf .git/refs/original/
$ git reflog expire --expire=now --all
$ git gc --prune=now
9. Remove file from history
https://myopswork.com/how-remove-files-completely-from-git-repository-history-47ed3e0c4c35
git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch path_to_file" HEAD

42
python_libs/Natasha.txt Normal file
View File

@ -0,0 +1,42 @@
https://github.com/natasha/natasha
====== install =========
pip install natasha
wget https://storage.yandexcloud.net/natasha-navec/packs/navec_hudlit_v1_12B_500K_300d_100q.tar
wget https://storage.yandexcloud.net/natasha-navec/packs/navec_news_v1_1B_250K_300d_100q.tar
======= config ========
from natasha import (
Segmenter,
MorphVocab,
NewsEmbedding,
NewsMorphTagger,
NewsSyntaxParser,
NewsNERTagger,
PER,
NamesExtractor,
Doc
)
segmenter = Segmenter()
morph_vocab = MorphVocab()
emb = NewsEmbedding()
morph_tagger = NewsMorphTagger(emb)
syntax_parser = NewsSyntaxParser(emb)
ner_tagger = NewsNERTagger(emb)
names_extractor = NamesExtractor(morph_vocab)
============= use ==============
text = 'Мама мыла раму'
doc = Doc(text)
doc.segment(segmenter)
doc.parse_syntax(syntax_parser)
doc.sents[0].syntax.print()

14
python_libs/Pymorphy.txt Normal file
View File

@ -0,0 +1,14 @@
https://pymorphy2.readthedocs.io/en/stable/user/index.html
======= install ========
pip install pymorphy2
pip install -U pymorphy2-dicts-ru
pip install -U pymorphy2-dicts-uk
========= config ============
import pymorphy2
parser = pymorphy2.MorphAnalyzer()
=========== use =============
parser.parse("слон")
parser.parse("слона")[0].inflect({'sing', 'nomn'}).word

16
python_libs/graphviz.txt Normal file
View File

@ -0,0 +1,16 @@
https://forum.graphviz.org/t/new-simplified-installation-procedure-on-windows/224
https://graphviz.readthedocs.io/en/stable/manual.html
====== install =========
pip install graphviz
======= config ========
from graphviz import Digraph
============= use ==============
dot = Digraph(comment='The Round Table')
dot.node('A', 'King Arthur')
dot.node('B', 'Sir Bedevere the Wise')
dot.node('L', 'Sir Lancelot the Brave')
dot.edges(['AB', 'AL'])
print(dot.source)

55
python_libs/vosk.txt Normal file
View File

@ -0,0 +1,55 @@
https://alphacephei.com/vosk/install
======= install ========
pip install vosk
pip install srt
pip install sounddevice
========= config ============
from vosk import Model, KaldiRecognizer, SetLogLevel
import sys
import os
import wave
import subprocess
import srt
import json
import datetime
sample_rate=16000
model = Model(r"D:\DEV\models\vosk-model-small-ru-0.15")
rec = KaldiRecognizer(model, sample_rate)
=========== use =============
process = subprocess.Popen(['ffmpeg', '-loglevel', 'quiet', '-i',
sys.argv[1],
'-ar', str(sample_rate) , '-ac', '1', '-f', 's16le', '-'],
stdout=subprocess.PIPE)
WORDS_PER_LINE = 7
def transcribe():
results = []
subs = []
while True:
data = process.stdout.read(4000)
if len(data) == 0:
break
if rec.AcceptWaveform(data):
results.append(rec.Result())
results.append(rec.FinalResult())
for i, res in enumerate(results):
jres = json.loads(res)
if not 'result' in jres:
continue
words = jres['result']
for j in range(0, len(words), WORDS_PER_LINE):
line = words[j : j + WORDS_PER_LINE]
s = srt.Subtitle(index=len(subs),
content=" ".join([l['word'] for l in line]),
start=datetime.timedelta(seconds=line[0]['start']),
end=datetime.timedelta(seconds=line[-1]['end']))
subs.append(s)
return subs