Skip to content

Instantly share code, notes, and snippets.

View korenmiklos's full-sized avatar

Miklós Koren korenmiklos

View GitHub Profile
lat lon
40.3381245 -74.653127
40.6581319 -73.9756447
50.9660479 10.3062993
50.7273062 12.4871539
52.521642 13.411007
54.4969325 13.5445994
47.7642521 15.8033294
47.689735 17.6000135
47.6037692 17.620454
from urllib2 import urlopen
from lxml.etree import parse
HOSTNAME = 'http://kozbeszerzes.ceu.hu'
otp = parse(urlopen(HOSTNAME + '/entity/t/10537914.xml'))
for tender in otp.xpath('//all_tenders_won/tender'):
print urlopen(HOSTNAME + tender.attrib['url'])
@korenmiklos
korenmiklos / statab
Last active August 29, 2015 14:08 — forked from pschumm/statab
#! /bin/bash
# Wrapper for "stata -b" which issues an informative error msg and appropriate
# (i.e., non-zero) return code
# The basic idea for this script (including grepping the log file to determine
# whether there was an error) was taken from a similar script posted by Brendan
# Halpin on his blog at http://teaching.sociology.ul.ie/bhalpin/wordpress/?p=122
args=$# # number of args
from skimage.feature import blob_log
from skimage.exposure import equalize_hist
from PIL import Image
from numpy import asarray
photo = Image.open("drone2.png").convert(mode="L")
ndarray = equalize_hist(asarray(photo))
blobs_log = blob_log(ndarray, min_sigma=1, max_sigma=50, num_sigma=20, threshold=.1)
print len(blobs_log)
@korenmiklos
korenmiklos / statab
Last active August 29, 2015 14:14 — forked from pschumm/statab
#! /bin/bash
# Wrapper for "stata -b" which issues an informative error msg and appropriate
# (i.e., non-zero) return code
# The basic idea for this script (including grepping the log file to determine
# whether there was an error) was taken from a similar script posted by Brendan
# Halpin on his blog at http://teaching.sociology.ul.ie/bhalpin/wordpress/?p=122
args=$# # number of args
@korenmiklos
korenmiklos / 0_reuse_code.js
Last active August 29, 2015 14:17
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
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.
@korenmiklos
korenmiklos / README.md
Created November 24, 2012 19:50 — forked from mbostock/.block
Multi-Series Line Chart
gistup