Skip to content

Instantly share code, notes, and snippets.

jmasonherr / Collect Parler Metadata.ipynb
Created Jan 12, 2021 — forked from kylemcdonald/Collect Parler Metadata.ipynb
Collect video URLs and GPS data for Parler videos.
View Collect Parler Metadata.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
jmasonherr / recursive_sql_example.sql
Created Feb 4, 2019
Bottom up recursive SQL example
View recursive_sql_example.sql
-- A bottom-up recursive Postgres query on a table named 'family'
-- with three columns: id, parent_id, child_id
WITH RECURSIVE bottom_up_family (
parent_id, child_id, depth, path
) AS (
jmasonherr /
Created Jun 28, 2018
Get current user from anywhere in Django 2.x with middleware
from __future__ import absolute_import, division, print_function
from threading import local
except ImportError:
from django.utils._threading_local import local
_thread_locals = local()
No dependency Python script for converting uBiome's raw data .zip
into a single FASTQ file. Based on
jmasonherr /
Created May 23, 2014
Naive Bayes and Fisher Classifier based on PCI book
# -*- coding: utf-8 -*-
import math
Statistical classification classes based on Toby Segarin's Programming Collective Intelligence. I wanted a version that was a little easier to read and didn't talk to SQLite. Its meant to be trained and tested on blocks of text.
This is good for separating things of discrete classes. Spam detection is used as the example in the book
jmasonherr /
Created May 12, 2014
Stripe connect tutorial for python
# coding: utf-8
import json
import stripe
import datetime
# Required for OAuth flow
from rauth import OAuth2Service
# Our secret key from stripe
STRIPE_SECRET_KEY = 'sk_test_xxxxxxxxxxxxx'
jmasonherr /
Last active Apr 21, 2020
Upload a photo to App Engine's Image service from a URL of an image elsewhere on the internet. Integrates App Engine's images service with InkPicker, so we can use their upload and store the actual image in our server
# Requires poster
# Requires webapp2 on App Engine for demo
# Example usage:
# import requests
# ''
# response ='', {'url': wikipediaimg})
import json