Skip to content

Instantly share code, notes, and snippets.

View ischurov's full-sized avatar

Ilya V. Schurov ischurov

View GitHub Profile
# Work by Ivan Pozdniakov
# See details: http://math-info.hse.ru/s20/g
2 < 3
2 > 3
2 == 3
some_comparison <- 2 != 3
1:10 > 5
1:10 >= 5
@ischurov
ischurov / lecture01.ipynb
Created January 12, 2021 17:35
lecture01.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This is due to fact that you modify your list when iterating it. You can check what's going on with pythontutor.com visualizer or add some print statements like this:

    templist = ['', 'hello', '', 'hi', 'mkay', '', '']
    
    for i, element in enumerate(templist):
        print("Step", i)
        print('element is', repr(element), 'and templist is', templist)
        if element == '':
            print("element is empty")
            templist.remove(element)
@ischurov
ischurov / SVG animation bug example.ipynb
Last active November 4, 2020 20:33
SVG animation bug example.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ischurov
ischurov / euler.ipynb
Created November 2, 2020 10:10
euler.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ischurov
ischurov / minimalistic-pipes-in-python.ipynb
Created July 8, 2020 21:11
minimalistic-pipes-in-python.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ischurov
ischurov / peaks.ipynb
Created July 7, 2020 23:53
peaks.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ischurov
ischurov / Untitled2.ipynb
Created June 23, 2019 00:04
melt-and-stack
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
We can make this file beautiful and searchable if this error is corrected: It looks like row 9 should actually have 11 columns, instead of 1. in line 8.
Country,Year,Happiness Score,Upper Confidence Interval,Lower Confidence Interval,Economy (GDP per Capita),Family,Freedom,Health (Life Expectancy),Trust (Government Corruption),Generosity
Switzerland,2015,7.587000000000001,7.653855600000001,7.5201444,1.3965100000000001,1.34951,0.66557,0.9414299999999999,0.41978000000000004,0.29678000000000004
Iceland,2015,7.561,7.6567264,7.4652736,1.3023200000000001,1.4022299999999999,0.6287699999999999,0.94784,0.14145,0.4363
Denmark,2015,7.527,7.5922288,7.4617712,1.32548,1.36058,0.6493800000000001,0.87464,0.48357,0.34139
Norway,2015,7.522,7.598048,7.445952,1.459,1.33095,0.66973,0.88521,0.36503,0.34699
Canada,2015,7.4270000000000005,7.4966388,7.357361200000001,1.32629,1.32261,0.63297,0.9056299999999999,0.32957,0.45811
Finland,2015,7.406000000000001,7.467544,7.344456000000001,1.29025,1.31826,0.64169,0.8891100000000001,0.41372,0.23351
Netherlands,2015,7.377999999999999,7.432860399999999,7.323139599999999,1.32944,1.28017,0.6157600000000001,0.89284,0.31814000000000003,0.4761
Swede