Skip to content

Instantly share code, notes, and snippets.

View gusennan's full-sized avatar

Nate Guerin gusennan

View GitHub Profile
@gusennan
gusennan / error_response.html
Created March 28, 2017 21:05
Cognitive Services TranslateArray error
<html:html xmlns:html="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="-//W3C//DTD XHTML 2.0//EN" xsi:schemaLocation="http://www.w3.org/1999/xhtml http://www.w3.org/MarkUp/SCHEMA/xhtml2.xsd" xml:lang="en">
<html:HEAD>
<html:TITLE>Request Error</html:TITLE>
</html:HEAD>
<html:BODY>
<html:DIV id="content">
<html:P class="heading1">
<html:B>Error Status Code:</html:B>
'InternalServerError'
</html:P>
@gusennan
gusennan / sample_corenlp.json
Created April 5, 2017 18:48
Same CoreNLP Json with Translations Added
{
"translated_on" : "2017-03-31T17:49:08.013463-04:00",
"sentences" : [
{
"index" : 0,
"tokens" : [
{
"index" : 1,
"pos" : "NR",
"word_translation" : "United States",
import sys
import random
import string
from itertools import combinations, repeat
from multiprocessing import Pool, cpu_count
from typing import List, Iterable, Tuple
def random_word(length: int) -> str:
return ''.join(random.choice(string.ascii_lowercase) for i in range(length))