This file contains hidden or 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 re | |
import string | |
import unidecode | |
from nltk.tokenize import sent_tokenize | |
from nltk.tokenize import word_tokenize | |
from nltk.stem import WordNetLemmatizer | |
from nltk.corpus import stopwords | |
import gensim.downloader as api | |
from pycontractions import Contractions | |
from word2number import w2n |
This file contains hidden or 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> | |
<meta charset="utf-8"> | |
<style> | |
div#map-container { | |
width: 800px; | |
height: 600px; | |
} | |
</style> | |
<body> | |
<div id="map-container"> |
This file contains hidden or 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 random | |
""" | |
Computes the Convex Hull with the Graham Scan algorithm | |
Use: | |
h = ConvexHull() | |
print(h.hull) | |
""" |
This file contains hidden or 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> | |
<head> | |
<meta charset="utf-8"> | |
<style> | |
body {font-family: helvetica;} | |
</style> | |
<script src="https://d3js.org/d3.v4.min.js"></script> | |
</head> | |
<body> | |
<div id="chart"></div> |
This file contains hidden or 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> | |
<meta charset="utf-8"> | |
<head> | |
<script src="https://d3js.org/d3.v4.min.js"></script> | |
<script src="//d3js.org/d3-scale-chromatic.v0.3.min.js"></script> | |
</head> | |
<body> | |
<div id="map-container"></div> | |
<script> |
This file contains hidden or 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> | |
<meta charset="utf-8"> | |
<html> | |
<head> | |
<script src="http://d3js.org/d3.v4.js"></script> | |
<link href="https://fonts.googleapis.com/css?family=Assistant&display=swap" rel="stylesheet"> | |
</head> | |
<body> | |
<div id="chart"></div> |
This file contains hidden or 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> | |
<meta charset="utf-8"> | |
<html> | |
<head> | |
<script src="http://d3js.org/d3.v4.js"></script> | |
<link href="https://fonts.googleapis.com/css?family=Kanit:400,700&display=swap" rel="stylesheet"> | |
</head> | |
<body> | |
<div id='tgif-container'> | |
<div id="tgif-chart"></div> |
This file contains hidden or 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 random | |
from PIL import Image | |
""" | |
Implements the flood fill algorithm in Python with depth-first search. | |
Inputs: | |
-image file | |
-new image file to write the new image to | |
-threshold for the color matching |
This file contains hidden or 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 random | |
m =[[2,3,3,3,3,3,4,4,4,4,4,4], | |
[2,3,3,3,3,3,4,4,4,4,4,4], | |
[3,3,3,1,3,3,4,1,4,4,0,4], | |
[3,3,1,1,1,3,1,1,1,4,4,4], | |
[3,1,1,1,1,1,1,1,1,1,4,4], | |
[3,1,1,0,0,0,0,0,1,1,4,4], | |
[3,1,1,0,0,0,0,0,1,1,4,4], | |
[2,1,1,1,1,0,0,0,1,1,2,2], |
This file contains hidden or 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> | |
<meta charset="utf-8"> | |
<html> | |
<head> | |
<script src="http://d3js.org/d3.v4.js"></script> | |
</head> | |
<body> | |
<div id='grid-container'> | |
<div id='grid-chart'></div> |