Skip to content

Instantly share code, notes, and snippets.

View wshanshan's full-sized avatar

Shanshan Wang wshanshan

View GitHub Profile
@wshanshan
wshanshan / scrapeNJDaycareOpenData.ipynb
Created December 16, 2021 19:26
This notebook demonstrates how to scrape data from NJ DCF portal
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wshanshan
wshanshan / asciiart.py
Last active August 24, 2024 18:19
Create ASCII art from an image
from PIL import Image, ImageDraw, ImageFont
from colour import Color
import numpy as np
# The function convert an image to ascii art
# f: Input filename
# SC: the horizontal pixel sampling rate. It should be between 0(exclusive) and 1(inclusive). The larger the number, the more details in the output.
# If you want the ascii art output be the same size as input, use ~ 1/ font size width.
# GCF: >0. It's an image tuning factor. If GCF>1, the image will look brighter; if 0<GCF<1, the image will look darker.
# out_f: output filename
@wshanshan
wshanshan / chicagoDaycares.ipynb
Created August 7, 2017 15:01
Map of chicago daycares
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.