Skip to content

Instantly share code, notes, and snippets.

View redsymbol's full-sized avatar

redsymbol

  • San Franicsco, CA, USA
View GitHub Profile
@redsymbol
redsymbol / djenv.py
Created December 1, 2023 15:31
Export Django model as CSV
'''
Usage:
export DJANGO_SETTINGS_MODULE=project_name.settings
djcsv.py someapp.models.SomeModel > output.csv
Run "djenv.py -h" for full help.
@redsymbol
redsymbol / demo.py
Last active January 12, 2018 17:28
Demo code for policy gradient question
'''_
Demo code for my question here:
https://www.reddit.com/r/reinforcementlearning/comments/7pxvh1/help_with_a_policy_gradient_detail/
Run with:
python3 demo.py --verbose --episodes 100000
;; htmlutil - Some useful tools for working with HTML text and HTTP URLs
; This module provides tools for escaping HTML text, with HTML
; entities for special characters; and for escaping strings to be
; safely included into URLS; and back.
;; Primary commands:
; html-escape-str - Escape (quote) a character for HTML
; html-unescape-str - Un-escape an HTML entity string
; url-quote-str - Quote special characters in a URL string