Skip to content

Instantly share code, notes, and snippets.

View PaperDevil's full-sized avatar
🇺🇦
I regret what I didn't do

Danil Gorev PaperDevil

🇺🇦
I regret what I didn't do
View GitHub Profile
@PaperDevil
PaperDevil / vue-electron.sh
Last active December 6, 2020 23:23
Vue-electron creation scenario
npm install -g @vue/cli
vue create vue-electron-app
vue add vuetify
vue add electron-builder
npm install -D @types/electron-devtools-installer
npm install -D @types/node@">=12.0.0 <13.0.0"
npm install core-js@3 --save
@PaperDevil
PaperDevil / selection_sort.py
Created February 2, 2020 19:32
Алгоритм сортировки выбором
def selection_sort(area):
sorted = []
for i in range(len(area)):
minimum = area.index(min(area))
sorted.append(area.pop(minimum))
return sorted
@PaperDevil
PaperDevil / binary_search.py
Last active February 2, 2020 18:13
Короткий алгоритм бинарного поиска.
def binary_search(area, item):
mid = len(area) // 2
low, high = 0, len(area) - 1
while low <= high:
if area[mid] == item: return mid
if item > area[mid]: low = mid + 1
else: high = mid - 1
mid = (low + high) // 2
return None