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
# code_block.py | |
# | |
# This script analyzes the source files with some markers to find | |
# the line numbers of the code blocks, and then uses markdown-autodoc | |
# to generate markdown files with the code blocks. One difference | |
# from using markdown-autodoc directly is that one don't have to | |
# hardcode the line numbers so can somehow feel free to modify the | |
# source code. | |
# | |
# Usage: python code_block.py [markdown input] [markdown out] [source code] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# Install first | |
# conda create --name forte python=3.9 pip | |
# pip install forte | |
# pip install forte.nltk | |
# pip install forte.spacy | |
# if you want to use it in the notebook | |
# pip install jupyter lab | |
# Find our medium blog at: medium.com/casl-project/ |
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
{ | |
"name": "all_ontology", | |
"definitions": [ | |
{ | |
"entry_name": "ft.onto.base_ontology.Token", | |
"parent_entry": "forte.data.ontology.top.Annotation", | |
"description": "A span based annotation :class:`Token`, used to represent a token or a word.", | |
"attributes": [ | |
{ | |
"name": "pos", |
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 json | |
import urllib.request | |
import urllib.parse | |
import sys | |
import datetime | |
import os | |
output_dir = sys.argv[1] | |
apikey = sys.argv[2] |
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
# Save each emoticon in a line at the EMOFILE location below | |
# I use this gist : https://gist.github.com/hunterhector/7458898 | |
# Add the following to your .bash_profile to get random emoticons in your bash prompt. | |
# This works for Mac, change gsort to sort on general Linux distributions. | |
# Config Emoticon for PS1 | |
export EMOFILE=~/.dotfiles/emoticons | |
export UCOLOR="\[\033[1;34m\]" | |
export WCOLOR="\[\033[1;39m\]" |
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/python | |
import re | |
def regex_prime(n): | |
l = "1" * n | |
return re.match(r"^1?$|^(11+?)\1+$", l) == None | |
while True: | |
n = raw_input("\nEnter a number and test for prime:") | |
try: |
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
(´・ω・`) | |
(˘❥˘) | |
(・ิω・ิ) | |
(。▰‿‿▰。) ❤ | |
( ・ิω・ิ)ノิ | |
Z(∩3∩)Z | |
o( ̄ヘ ̄o#). | |
╰(*°▽°*)╯ | |
ʅ(‾◡◝)ʃ | |
ʕ •ᴥ•ʔ |