Skip to content

Instantly share code, notes, and snippets.

View emredjan's full-sized avatar

Emre Can emredjan

View GitHub Profile
@emredjan
emredjan / json_to_csv.py
Last active October 21, 2022 01:46
Yelp Dataset Challenge JSON to CSV conversion
'''
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
@emredjan
emredjan / cactivate.ps1
Last active November 22, 2018 13:51
Activate conda environment in PowerShell
Param
(
[parameter(Position=0, Mandatory=$true)]
[String]
$env_name
)
# simulate activation of Conda environment
$cenv = "C:\Path\to\anaconda\installation\envs\$env_name"
$Env:CONDA_PREFIX = $cenv