Skip to content

Instantly share code, notes, and snippets.

@miguellopes
miguellopes / Google_Colaboratory_backup.py
Created August 29, 2019 21:08 — forked from rdinse/Google_Colaboratory_backup.py
Simple Google Drive backup script with automatic authentication for Google Colaboratory (Python 3)
# Simple Google Drive backup script with automatic authentication
# for Google Colaboratory (Python 3)
# Instructions:
# 1. Run this cell and authenticate via the link and text box.
# 2. Copy the JSON output below this cell into the `mycreds_file_contents`
# variable. Authentication will occur automatically from now on.
# 3. Create a new folder in Google Drive and copy the ID of this folder
# from the URL bar to the `folder_id` variable.
# 4. Specify the directory to be backed up in `dir_to_backup`.
@miguellopes
miguellopes / json-to-csv.php
Last active July 3, 2016 16:24 — forked from Kostanos/json-to-csv.php
Convert large JSONL files to CSV.Use the array keys as the first row.Command line using:json-to-csv.php json.filename > csv.filename
#!/usr/bin/php
<?php
/*
* Convert JSON file to CSV and output it.
*
* JSON should be an array of objects, dictionaries with simple data structure
* and the same keys in each object.
* The order of keys it took from the first element.
*
* Example: