Skip to content

Instantly share code, notes, and snippets.

View illright's full-sized avatar

Lev Chelyadinov illright

View GitHub Profile
@illright
illright / Проводящие.md
Last active September 1, 2017 19:15
Распределение людей 11Е по конкурсам
@illright
illright / Процесс.md
Last active September 24, 2017 16:36
Процесс посвята

Требуется

От нас

  • карточки для звездочек
  • две зеленки
  • пульверизаторы

От детей

  • шарфики
  • пледы и жратва
@illright
illright / Гороскоп.txt
Last active September 1, 2017 10:12
Распределение языков программирования
Овен: PHP
Лев: Scala
Стрелец: C#
Телец: JavaScript
Дева: ASM
Козерог: Python
Близнецы: алгоритмический
Весы: Java
Водолей: HTML
Рак: Pascal
@illright
illright / Слова2.txt
Last active August 30, 2017 19:46
Слова для конкурса Слова (для конкурса)
Информатика:
сипЛЮСПЛЮс
переДАЧАДАнных
оТРИЦАНие
жестКИЙДИск
основаНИЕСИСтемы
систЕМАСЧИсления
аЛГОРИТм
таблИЦАИСТинности
компьютерНАЯБЕЗопасность
@illright
illright / Конкурсы.md
Last active September 1, 2017 15:18
Конкурсы на посвят
  1. Крокодил
  2. Рукопоп
  3. Яблоко
  4. Наполнение бутылки
  5. Поребрик
  6. Паутинка
  7. Минное поле
  8. Поиск предметов
  9. 33 несчастья
  10. Муз. пауза
@illright
illright / слова.txt
Created August 27, 2017 17:55
Слова для крокодила
Будильник
Зарядка
Акварель
Травма
Оригами
Пульс
Спорт
Канатоходец
Магнитофон
Халат
@illright
illright / MinSpanTree.py
Last active May 6, 2017 08:49
Comparator of Kruskal's and Prim's MST searching algorithms
# MinSpanTree - Comparator of Kruskal's and Prim's MST searching algorithms
# Requires `graph.txt` - an adjacency matrix that defines the graph
# Put dashes (-) where there's no way
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
import networkx as nx
from queue import PriorityQueue
def matrix_to_graph(matrix):
@illright
illright / ShortestWay.py
Last active February 18, 2018 10:00
Comparator for Dijkstra's and Ford-Bellman's pathfinding algorithms
# ShortestWay - comparator for Dijkstra's and Ford-Bellman's pathfinding algorithms
# Requires `graph.txt` - start and end points and an adjacency matrix that defines the graph
# Put dashes (-) where there's no way
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
import networkx as nx
from queue import PriorityQueue
inf = float('inf')
@illright
illright / alerror.js
Last active June 9, 2017 17:37
JS snippet to redirect errors to an alert (for debugging in Safari)
window.addEventListener('error', handleError, true);
function handleError(event) {
if (event.message) {
window.alert('error: ' + event.message + ' at linenumber: ' + event.lineno + ' of file: ' + event.filename);
} else {
window.alert('error: ' + event.type + ' from element: ' + (event.srcElement || event.target));
}
}
@illright
illright / LinkComp.py
Last active May 6, 2017 08:48
Script that finds strongly connected components in a directed graph and visualizes them
# LinkComp - script that finds strongly connected components in a directed graph and visualizes them
# Requires `graph.txt` - adjacency matrix that defines the graph
import numpy as np
import matplotlib.pyplot as plt
import networkx as nx
import re
g = []
ptn = re.compile('[01]')
with open('graph.txt') as f: