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
employer_item_id | count | text_data | class_type | context | |
---|---|---|---|---|---|
2944031 | 9 | Counter Terrorist Unit | employer | fictional branch of the CIA from the television series 24 | |
214126 | 53 | Los Angeles Police Department | employer | municipal police | |
37230 | 493 | Central Intelligence Agency | employer | national intelligence agency of the United States | |
9531 | 1520 | BBC | employer | British public service broadcaster | |
134995 | 57 | bibliography | employer | ||
21198 | 842 | computer science | employer | study of the theoretical foundations of information and computation | |
5962346 | 1 | classification system | employer | organisation of objects into classes | |
482 | 1218 | poetry | employer | form of literary art |
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
occupation_item_id | count | text_data | class_type | context | |
---|---|---|---|---|---|
82955 | 606008 | politician | occupation | person involved in politics or person who holds or seeks positions in government | |
189290 | 33481 | military officer | occupation | member of an armed force or uniformed service who holds a position of authority | |
131512 | 8887 | farmer | occupation | person that works in agriculture | |
1734662 | 2012 | cartographer | occupation | person preparing geographical maps | |
294126 | 323 | land surveyor | occupation | profession | |
81096 | 34500 | engineer | occupation | professional practitioner of engineering and its sub classes | |
372436 | 3790 | statesperson | occupation | politician in high government offices | |
5446967 | 29 | field agent | occupation | agent who works in the field as opposed to one who works at the office or headquarters | |
4991371 | 6642 | soldier | occupation | one who serves as part of an organized armed force |
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
model | lowest_confidence | text_data | class_type | corrected_class_type | |
---|---|---|---|---|---|
linear | 1 | deputy | employer | UNK | |
linear | 2 | chef | UNK | UNK | |
linear | 3 | VRP | occupation | UNK | |
polynomial | 1 | pen | employer | UNK | |
polynomial | 2 | mayor | employer | UNK | |
polynomial | 3 | art theft | occupation | UNK | |
radial basis | 1 | Academy of Finland | UNK | UNK | |
radial basis | 2 | Cultural Institutions Studies | UNK | UNK | |
radial basis | 3 | University of Helsinki | UNK | UNK |
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
import logging.config | |
import sys | |
def trylog(l): | |
for e in range(0, 50, 10): | |
l.log(e, 'level %s' % e) | |
if __name__ == '__main__': |
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
%matplotlib inline | |
import matplotlib.pyplot as plt | |
import numpy as np | |
dates_infections = {'3/1': 89, | |
'3/2': 105, | |
'3/3': 125, | |
'3/4': 159, | |
'3/5': 227, | |
'3/6': 331, | |
'3/7': 444, |
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
spondaic 'at si staret' ait 'caelebs sine palmite truncus, | |
spondaic Aeneae genetrix, vidit quoque triste parari | |
spondaic Has ubi verborum poenas mentisque profanae | |
spondaic Hunc ubi laudatos iactantem in sanguine vultus | |
spondaic Maenala transieram latebris horrenda ferarum | |
spondaic adiectoque cavae supplentur corpore rugae, | |
spondaic admotumque fretum remis tellusque repulsa est, | |
spondaic aversata gemit; certa est exquirere nutrix | |
spondaic bella instructa gerunt, multumque ab utraque cruoris | |
spondaic bellaque non transfert, et sunt, qui parcere Troiae |
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
# Some notes on this gist: | |
# all abstract and base class stuff has been moved to the top of the file so that import resolution | |
# and IDEs won't complain unnecessarily. | |
# _get_model_path is default method | |
# tokenize has been promoted to be a default method, and signatures downstream were made consistent with this; | |
# -- whether this is a great idea is open to debate | |
# The default list argument, a subtle bug, has been corrected, e.g. see https://docs.python-guide.org/writing/gotchas/ | |
# the self : object annotation has been removed as it is implied and it confuses IDE. | |
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
# Add to .bash_profile | |
function gittitle() { | |
echo -n -e "\033]0;`git status | awk 'NR==1 {print $3}'`\007" | |
} | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} |
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
# rotate text in a file, such as banner text | |
# surprised this isn't a library function, for silly text operations | |
import sys | |
import re | |
def create_matrix(height): | |
matr = list() | |
for i in range(0, height): | |
matr.append(list()) |
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
>>> import keyword | |
>>> keyword.kwlist | |
['False', 'None', 'True', 'and', 'as', 'assert', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'nonlocal', 'not', 'or', 'pass', 'raise', 'return', 'try', 'while', 'with', 'yield'] | |
>>> import builtins | |
>>> dir(builtins) | |
['ArithmeticError', 'AssertionError', 'AttributeError', 'BaseException', 'BlockingIOError', 'BrokenPipeError', 'BufferError', 'BytesWarning', 'ChildProcessError', 'ConnectionAbortedError', 'ConnectionError', 'ConnectionRefusedError', 'ConnectionResetError', 'DeprecationWarning', 'EOFError', 'Ellipsis', 'EnvironmentError', 'Exception', 'False', 'FileExistsError', 'FileNotFoundError', 'FloatingPointError', 'FutureWarning', 'GeneratorExit', 'IOError', 'ImportError', 'ImportWarning', 'IndentationError', 'IndexError', 'InterruptedError', 'IsADirectoryError', 'KeyError', 'KeyboardInterrupt', 'LookupError', 'MemoryError', 'NameError', 'None', 'NotADirectoryError', 'Not |
NewerOlder