Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Homo Sapiens

Nov05

💭
Homo Sapiens
View GitHub Profile
@Nov05
Nov05 / json_to_csv.py
Created Dec 5, 2019 — forked from emredjan/json_to_csv.py
Yelp Dataset Challenge JSON to CSV conversion
View json_to_csv.py
'''
Load Yelp JSON files and spit out CSV files
Does not try to reinvent the wheel and uses pandas json_normalize
Kinda hacky and requires a bit of RAM. But works, albeit naively.
Tested with Yelp JSON files in dataset challenge round 12:
https://www.yelp.com/dataset/challenge
'''
import json
@Nov05
Nov05 / selenium.py
Created Jul 4, 2019 — forked from korakot/selenium.py
Use selenium in Colab
View selenium.py
# install chromium, its driver, and selenium
!apt install chromium-chromedriver
!cp /usr/lib/chromium-browser/chromedriver /usr/bin
!pip install selenium
# set options to be headless, ..
from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_argument('--headless')
options.add_argument('--no-sandbox')
options.add_argument('--disable-dev-shm-usage')