Skip to content

Instantly share code, notes, and snippets.

Avatar

Miklós Koren korenmiklos

View GitHub Profile
View decompose.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@korenmiklos
korenmiklos / shapely-example.py
Last active Jun 2, 2020
Example illustrating geospatial concepts in Python
View shapely-example.py
from shapely.geometry import Point
# suppose function projection(lat, lon) is already defined, returing (x, y) in meters
neighborgood_gps = (48.2176956, 16.3901985)
# a list of GPS coordinate pairs
transitstops_gps = [(), (), ..., ()]
neighborhood_shapely = Point(projection(neighborgood_gps))
for point in transitstops_gps:
View shell.md

bash-3.2$ 
bash-3.2$ 
bash-3.2$ 
bash-3.2$ 
bash-3.2$ 
bash-3.2$ 
bash-3.2$ 
bash-3.2$ 
View wiki2pdf.py
#!/usr/bin/env python2.7
import re, string
from sys import argv
from os import path, system, remove
class WikiParser:
"""Object that turns Wii LaTeX.
All formatting commands can be parsed one line at a time, though
View estimate_markov_chain.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View illustrate datetime.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View intervaltree examples.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View transliterate_cyrillic.py
# coding: utf-8
# transliteration from http://www.boutler.de/translit/trans.htm
RUS = (u'\u0430', u'\u0431', u'\u0432', u'\u0433', u'\u0434', u'\u0435', u'\u0451', u'\u0436', u'\u0437',u'\u0438', u'\u0439',
u'\u043A', u'\u043B', u'\u043C', u'\u043D', u'\u043E', u'\u043F', u'\u0440', u'\u0441', u'\u0442', u'\u0443', u'\u0444',
u'\u0445', u'\u0446', u'\u0447', u'\u0448', u'\u0449', u'\u044A', u'\u044B', u'\u044C', u'\u044D', u'\u044E', u'\u044F')
HUN = ('a', 'b', 'v', 'g', 'd', 'je', 'jo', 'zs', 'z', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'r', 'sz', 't', 'u', 'f',
'h', 'c', 'cs', 's', 'scs', '', 'i', '', 'e', 'ju', 'ja')
RUS_HUN = dict(zip(RUS,HUN))
def transliterate_to_hungarian(russian):
View chart.do
* oszag = 1,2,3
* kategoria = 1,2,3
gen y = 13-3*orszag-kategoria
tw (line y data if orszag==1, msymbol(circle)) (line y data if orszag==2, msymbol(circle)) (line y data if orszag==3, msymbol(circle)), ylabel(8 "Ausztria" 5 "Belgium" 2 "Dania") legend(off)
View get_spanish_links.py
You can’t perform that action at this time.