Skip to content

Instantly share code, notes, and snippets.

View korenmiklos's full-sized avatar

Miklós Koren korenmiklos

View GitHub Profile

Suppose there are $n$ questions on the test. Each can be answered correctly for 1 point or incorrectly for 0 point. Student $i$ has probability $\pi_i$ of answering each question correctly. (This can be generalized for asymmetric test questions.)

The expected number of correct answers is $n\pi_i$.

How to install Make on Windows 10 and later

  1. Install "App Installer" from the Microsoft Store
  2. Open a terminal with cmd (Run as Administrator) or Git Bash.
  3. Type winget install -e --id GnuWin32.Make to install GNUWin Make. This will be installed in C:\Program Files (x86)\GnuWin32\bin.
  4. Add this folder to path, so that make and other GNUWin tools you install can be invoked from anywhere.
  5. Launch a terminal again, and check that make results in this error message: make: *** No targets specified and no makefile found. Stop.

WSL alternative

Replicability Manifesto

  1. Cite everything that the replication package relies on.
    • Why: Citations in the manuscript and the README are the best way of directing readers to these resources and to give credit to the original authors.
    • How: All datasets, whether public or private, included or not, should be cited. It is good practice to cite software packages, but not required, unless the license terms specifically ask you to do so.
  2. Include all exhibits and the code to produce them ALL DATA THAT YOU ARE ABLE (drill down).
    • Why: The package should be self contained so that readers can verify that your analysis code produces the output you included.
    • How: Save all the output of the analysis in some standard format into the replication package. Tables can be saved as .csv, .xls or .tex files. It is also sufficient to save the Stata .log file. In this case, please report in the README the line numbers where the readers can find the table numbers. Figures can be saved in .eps, .pdf or .png.
    • How 2: Re
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 June 2, 2020 20:10
Example illustrating geospatial concepts in Python
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:
@korenmiklos
korenmiklos / shell.md
Created February 21, 2019 23:42
shell session

bash-3.2$ 
bash-3.2$ 
bash-3.2$ 
bash-3.2$ 
bash-3.2$ 
bash-3.2$ 
bash-3.2$ 
bash-3.2$ 
#!/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
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.