Skip to content

Instantly share code, notes, and snippets.

diff --git a/opendebates/views.py b/opendebates/views.py
index b388b09..f424874 100644
--- a/opendebates/views.py
+++ b/opendebates/views.py
@@ -21,7 +21,8 @@ from .models import Candidate, Category, Flag, Submission, \
from .router import readonly_db
from .utils import get_ip_address_from_request, get_headers_from_request, choose_sort, sort_list, \
vote_needs_captcha, registration_needs_captcha, show_question_votes, \
- allow_voting_and_submitting_questions, get_local_votes_state, get_previous_debate_time
+ allow_voting_and_submitting_questions, get_local_votes_state, get_previous_debate_time, \
trump
tramp
trap
rap
rape
race
pace
peace
pence
@ejucovy
ejucovy / CLA.md
Last active July 6, 2016 21:01
350.org megamap CLA

Contributor Agreement

Individual Contributor Non-Exclusive License Agreement

including the Patent Pledge OPTION

Thank you for your interest in contributing to 350.org ("We" or "Us").

The purpose of this contributor agreement ("Agreement") is to clarify and document the rights granted by contributors to Us. To make this document

Thank you for your interest in contributing to Coworker.org ("We" or "Us").
The purpose of this contributor agreement ("Agreement") is to clarify and document the rights granted by contributors to Us. To make this document effective, please follow the instructions at https://cla-assistant.io/coworkerdotorg/employer-pages
1. DEFINITIONS
"You" means the Individual Copyright owner who submits a Contribution to Us. If You are an employee and submit the Contribution as part of your employment, You have had Your employer approve this Agreement or sign the Entity version of this document.
"Contribution" means any original work of authorship (software and/or documentation) including any modifications or additions to an existing work, Submitted by You to Us, in which You own the Copyright. If You do not own the Copyright in the entire work of authorship, please contact Us at [email protected].
"Copyright" means all rights protecting works of authorship owned or controlled by You, including copyright, moral and nei
@ejucovy
ejucovy / create_survey.py
Last active December 9, 2015 14:20
nationbuilder developer exercises
import requests
import json
import os
ACCESS_TOKEN = os.environ['NB_ACCESS_TOKEN']
SLUG = os.environ['NB_SITE_PREFIX']
data = {
"survey": {
"slug": "survey",
@ejucovy
ejucovy / cron.sql
Created April 30, 2015 15:10
ActionKit survey response tallying
select name, value, count(distinct user_id) from core_actionfield f
join core_action a on a.id=parent_id
where page_id=MY_SURVEY_PAGE
group by name, value order by name, value;
@ejucovy
ejucovy / page.custom_fields.interactive_quiz_responses
Last active August 29, 2015 14:20
ActionKit quiz code snippet
{
"eighth_president": "Martin van Buren",
"us_capital": "Washington, DC",
"war_end": "1814"
}
@ejucovy
ejucovy / hallo-edit-html.js
Last active March 15, 2020 16:31
wagtail - hallo.js "edit html" button
(function() {
(function($) {
return $.widget('IKS.editHtmlButton', {
options: {
uuid: '',
editable: null
},
populateToolbar: function(toolbar) {
var button, widget;
### pip install pycrypto
import base64
from Crypto.Cipher import AES
from Crypto import Random
import datetime
import hashlib
import hmac
import json
import os
@ejucovy
ejucovy / wsgi.py
Created October 16, 2013 13:35
Trac WSGI script that sets database uri from environment variable
import os
import trac.web.main
from trac.env import open_environment, Environment
from trac.util import translation
import gc
import threading
def application(environ, start_response):
req = trac.web.main.RequestWithSession(environ, start_response)
run_once = environ['wsgi.run_once']