Skip to content

Instantly share code, notes, and snippets.

View hlawrenz's full-sized avatar

Hans Lawrenz hlawrenz

View GitHub Profile
@hlawrenz
hlawrenz / flower command line
Last active February 5, 2023 19:00
Serve celery flower behind Django authentication.
celery flower --address=127.0.0.1 --url_prefix=flower --broker=<broker url>
def invalid_cusip(cusip):
"""
:param cusip:
:type cusip: str
:return:
"""
cusip = cusip.upper()
if len(cusip) > 9:
return 'CUSIP is too long'
@hlawrenz
hlawrenz / csv2json.py
Created June 6, 2014 14:47
A bunch of csv related python scripts.
#!/usr/bin/env python
import argparse
import csv
import sys
from collections import OrderedDict
import simplejson as json