Skip to content

Instantly share code, notes, and snippets.

@gh640
gh640 / firestore2csv.py
Last active January 29, 2023 18:14
Sample: Script to export Firestore collection as CSV
"""Script to export Firestore collection as CSV."""
import csv
import sys
from pathlib import Path
from firebase_admin import credentials, firestore, initialize_app
CRED_FILE = Path(__file__).resolve().parent / 'firebase-privateKey.json'
COLLECTION_NAME = 'XXX'
@wynch
wynch / Xcode_version_from_package.sh
Last active November 8, 2023 03:28
React Native - Set Gradle & XCode build version from package.json
#!/usr/bin/env bash -e
##
## Automatic version from package.json file
##
## Call this script from your XCode Scheme:
## - Copy / paste this script in a .sh file
## - Open your app scheme in XCode (shortcut: Cmd + <)
## - go to Build > Pre-actions
## - Add a run Script ('+' button in scheme window > "New Run Script Action"
@gtallen1187
gtallen1187 / slope_vs_starting.md
Created November 2, 2015 00:02
A little bit of slope makes up for a lot of y-intercept

"A little bit of slope makes up for a lot of y-intercept"

01/13/2012. From a lecture by Professor John Ousterhout at Stanford, class CS140

Here's today's thought for the weekend. A little bit of slope makes up for a lot of Y-intercept.

[Laughter]

@devdazed
devdazed / lp_counters.py
Created October 11, 2012 16:14
Simple Linear Probabilistic Counters
"""
Simple Linear Probabilistic Counters
Credit for idea goes to:
http://highscalability.com/blog/2012/4/5/big-data-counting-how-to-count-a-billion-distinct-objects-us.html
http://highlyscalable.wordpress.com/2012/05/01/probabilistic-structures-web-analytics-data-mining/
Installation:
pip install smhasher
pip install bitarray