Skip to content

Instantly share code, notes, and snippets.

View iliakonnov's full-sized avatar
🦕

Ilia Konnov iliakonnov

🦕
View GitHub Profile
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.widgets import Slider
import matplotlib.lines as mlines
fig, ax = plt.subplots()
plt.subplots_adjust(bottom=0.60)
plt.grid(True)
MIN = -10
@iliakonnov
iliakonnov / backtrace.full.log
Last active February 7, 2020 09:26
ICE with proc_macro_attribute on pub(super) function in module
thread 'rustc' panicked at 'path resolved multiple times (PartialRes { base_res: Def(Mod, DefId(0:0)), unresolved_segments: 0 } before, PartialRes { base_res: Def(Mod, DefId(0:0)), unresolved_segments: 0 } now)', src/librustc_resolve/lib.rs:2414:13
stack backtrace:
0: 0x7f9dd643afe8 - backtrace::backtrace::libunwind::trace::h86edaa2680be3f32
at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/libunwind.rs:88
1: 0x7f9dd643afe8 - backtrace::backtrace::trace_unsynchronized::h020717321cc60d9f
at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/mod.rs:66
2: 0x7f9dd643afe8 - std::sys_common::backtrace::_print_fmt::h95a740d649d8282b
at src/libstd/sys_common/backtrace.rs:77
3: 0x7f9dd643afe8 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h229d12a248a94d4d
at src/libstd/sy
@iliakonnov
iliakonnov / apache.scc
Created March 19, 2020 17:19
sloc in chromium and in other projects
───────────────────────────────────────────────────────────────────────────────
Language Files Lines Blanks Comments Code Complexity
───────────────────────────────────────────────────────────────────────────────
C 352 288903 35009 41638 212256 45085
XML 281 93275 13604 5176 74495 0
HTML 262 4608 926 8 3674 0
Forth 244 93006 13524 0 79482 656
C Header 197 38049 4830 19153 14066 285
Autoconf 80 6398 778 1832 3788 500
m4 56 3842 416 89 3337 0
import random
ROCK = 1
SCISSORS = 2
PAPER = 3
DRAW = 'Draw.'
HUMAN = 'Human'
BOT = 'BIP-BOP'
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
def getChar(x, y, accuracy, fns):
d = 1 / accuracy / 2
res = ' '
clr = 0
n = 0
for fn in fns:
ll = 1 if fn(x, y)[0] else 0
lr = 2 if fn(x + d, y)[0] else 0
ul = 4 if fn(x, y + d)[0] else 0
ur = 8 if fn(x + d, y + d)[0] else 0
(function(my_name_is) {
let head_table = $("table").rows[1].cells;
let luckies = parseInt(head_table[0].textContent) + parseInt(head_table[1].textContent);
let enemies = $("table.tableFixHead").rows;
let my_points = 0;
let my_place = 0;
let suspicious = 0;
let better_than_me = 0;
let fat_people = 0;
!<arch>
7.1b.log/ 0 0 0 644 176 `
1 7 7 9
7 5 1 -1
4 2 -1 -3
-1 1 3 5
~2 - 7*~1
~3 - 4*~1
~4 + ~1
class Empty:
def __init__(self):
pass
def __repr__(self):
return '[]'
def reduce(self):
yield Empty()
from sympy.algebras.quaternion import Quaternion
from sympy import latex, Matrix, symbols
i, j, k = symbols('i j k')
def display(q):
return sum([
x*y
for x, y in [(q.a, 1),
(q.b, i),