This file has been moved to Gitlab.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package nlp.salience.fsutils | |
/** | |
* @author yc <https://github.com/skylander86/> | |
* @version 0.1 | |
* | |
* This package contains code for transparently reading and writing files to/from supported filesystems. | |
* This is useful as a drop in replacement that understands filesystem differences. | |
* Right now, it only supports local file, S3 (either using Hadoop or Amazon AWS SDK) and Hadoop filesystem. | |
* | |
* Example usage: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<meta name="description" content=""> | |
<meta name="author" content=""> | |
<title>Starter Template for Bootstrap</title> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#define FALSE 0 | |
#define TRUE 1 | |
#define BUFSIZE 1024 | |
int main(void) { | |
setvbuf(stdin, (char *) NULL, _IOFBF, 0); /* better performance if we buffer stdin */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def fleiss_kappa(M): | |
""" | |
See `Fleiss' Kappa <https://en.wikipedia.org/wiki/Fleiss%27_kappa>`_. | |
:param M: a matrix of shape (:attr:`N`, :attr:`k`) where `N` is the number of subjects and `k` is the number of categories into which assignments are made. `M[i, j]` represent the number of raters who assigned the `i`th subject to the `j`th category. | |
:type M: numpy matrix | |
""" | |
N, k = M.shape # N is # of items, k is # of categories | |
n_annotators = float(np.sum(M[0, :])) # # of annotators |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This code is a Python 2.7 port of [aws-lambda-ses-forwarder](https://github.com/arithmetric/aws-lambda-ses-forwarder). Follow instructions there for setting up SES and AWS Lambda. | |
""" | |
from email import message_from_file | |
import json | |
import logging | |
import os | |
import re |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from argparse import ArgumentParser | |
import logging | |
import os | |
import sys | |
import subprocess | |
import time | |
import boto3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// set up our units of conversions, could be shared between multiple calculators | |
var units = { | |
"age": {"yr": 1, "mth": 12.0}, | |
"weight": {"kg": 1, "lb": 2.20462}, | |
"creatinine": {"gm/L": 0.01, "gm/dL": 0.001, "mg%": 1, "mg/dL": 1, "mg/mL": 0.01}, | |
"output": {"mL/min": 1, "L/hr": 0.06} | |
}; | |
// get the inputs specific to this calculator (irl, this would come from the form fields) | |
var inputs = { |
I hereby claim:
- I am skylander86 on github.
- I am skylander (https://keybase.io/skylander) on keybase.
- I have a public key ASAIqjDt-DzF3IxVW0ni54X5YLuCoK9o6VQ2RyqQjs7-ywo
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DATE_REGEXES = [ | |
re.compile(r'\b(?P<year>199\d|200\d|201\d)[\-\u2010\u2014\u2013\.\_\/\s]{1,2}(?P<month>1|2|3|4|5|6|7|8|9|01|02|03|04|05|06|07|08|09|10|11|12)[\-\u2010\u2014\u2013\.\_\/\s]{1,2}(?P<day>1|2|3|4|5|6|7|8|9|01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)\b'), # 2017-09-28 | |
re.compile(r'\b(?P<day>1|2|3|4|5|6|7|8|9|01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)[\-\u2010\u2014\u2013\.\_\/\s]{1,2}(?P<month>1|2|3|4|5|6|7|8|9|01|02|03|04|05|06|07|08|09|10|11|12)[\-\u2010\u2014\u2013\.\_\/\s]{1,2}(?P<year>199\d|200\d|201\d)\b'), # 28-9-2017 | |
re.compile(r'\b(?P<month>1|2|3|4|5|6|7|8|9|01|02|03|04|05|06|07|08|09|10|11|12)[\-\u2010\u2014\u2013\.\_\/\s]{1,2}(?P<day>1|2|3|4|5|6|7|8|9|01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)[\-\u2010\u2014\u2013\.\_\/\s]{1,2}(?P<year>199\d|200\d|201\d)\b'), # 9-28-2017 | |
re.compile(r'\b(?P<year>199\d|200\d|201\d)[\-\u2 |
OlderNewer