Skip to content

Instantly share code, notes, and snippets.

View soldni's full-sized avatar
🏳️‍🌈
vibing!

Luca Soldaini soldni

🏳️‍🌈
vibing!
View GitHub Profile
@soldni
soldni / MetaMapApiTest.java
Created June 3, 2015 20:38
Slightly modified version of tester for metamap apis that returns a JSON compatible object (requires [json-simple](https://code.google.com/p/json-simple/))
package gov.nih.nlm.nls.metamap;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import java.io.InputStream;
import java.io.PrintStream;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.File;
import java.util.List;
@soldni
soldni / lsnames.py
Created October 21, 2015 20:12
Create Names staring with L and S for computer hardware.
from random import randint
from nltk.corpus import wordnet as wn
from time import time
print("Loading NLTK... be patient.")
start = time()
adj_candidates = list(
set(
e.name().split('.')[0] for e in wn.all_synsets('a')
if (
#!/usr/bin/env python
from __future__ import unicode_literals
import sys
import codecs
import re
import codecs
statecodes = (
{
"va": [
[
36.546198,
-79.144063
],
[
36.549921,
-79.216803
],
@soldni
soldni / gps2state.py
Last active November 26, 2015 14:09
Little tool to map gps coordintates to states
from __future__ import division
import json
def is_counterclockwise(a, b, c):
"""Check if three points are sorted counterclockwise.
See http://jeffe.cs.illinois.edu/teaching/373/notes/x05-convexhull.pdf
for more info."""
aspe... non è che escludo compensazione economica per il donatore.
Uso "donazione" invece di "affitto" per indicare che non è un
semplice accordo economico, ma uno scambio che va fatto con le
priorità del donatore in primo piano. Per esempio:
1. Il donatore deve uscire dalla gravidanza senza debiti o altri
problemi. Per esempio, il datore di lavoro deve garantire maternità.
2. Se il donatore è una persona senza lavoro, la società che
gesticsce le donazioni deve anche provvedere per il re-inserimento
nella società del donatore
<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 TransitionalEN" "http:www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http:www.w3.org/1999/xhtml">
<head id="ctl00_ctl00_Head1">
<title>ATTRACT | What is the evidence for betamethasone cream versus circumcision in phimosis?</title>
<link rel="stylesheet" type="text/css" href="css/style.css?ver=07072010" title="default" media="all" />

How to Run MetaMap

First, start the tagger server

bin/skrmedpostctl start

Then, start WSD Server:

@soldni
soldni / es-manager.sh
Last active April 6, 2016 01:52
Starts/stop deamons for elasticsearch
#!/bin/bash
# SETTINGS
USAGE="USAGE: ./es-manager.sh [start|stop] {instances to start}"
ERROR_INT="ERROR: second paramter must be an integer or none."
ERROR_ESHOME="ERROR: Environmental variable ES_HOME is not set."
PID_DIR="pid"
# print error is ES_HOME is not set
if [ -z ${ES_HOME+x} ]

How to install OpenBLAS & multi-threaded Numpy on RedHat

(main source; other info; even more help)

Step 1: make sure to have gfortran installed

Step 2: clone the OpenBLAS repo.

git clone https://github.com/xianyi/OpenBLAS