View stats_created_per_gallery
# In the ./app dir execute: remote_api_shell.py -s arts-612.appspot.com | |
# Script to get all the events listed by when they were posted | |
from app.modules.events.internal.entities import EventEntity | |
q = EventEntity.query() | |
hist = {} | |
cursor = None | |
more = True | |
while(more): |
View prefs_export.py
# Generate a csv of the prefs data | |
# In the ./app dir execute: remote_api_shell.py -s pref-service.appspot.com | |
import csv | |
from api.entities import PreferenceEntity | |
from rest_core.utils import get_resource_id_from_key | |
q = PreferenceEntity.query() | |
cursor = None |
View sdk_options_hack.txt
if environ['REQUEST_METHOD'] == 'OPTIONS' and environ['REQUEST_URI'][0:12] == '/_ah/upload/': | |
logging.warning("Hacked OPTIONS request for /_ah/upload - see module.828") | |
wrapped_start_response('200 SUPER GREAT', | |
[ | |
('Access-Control-Allow-Origin', '*'), | |
('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE'), | |
('Access-Control-Allow-Credentials', 'true'), | |
('Content-Type', 'application/json'), | |
('Access-Control-Allow-Headers', '*'), | |
]) |
View stats_created_per_month
# In the ./app dir execute: remote_api_shell.py -s arts-612.appspot.com | |
# Script to get all the events listed by when they were posted | |
from app.modules.events.internal.entities import EventEntity | |
q = EventEntity.query() | |
hist = {} | |
cursor = None | |
more = True | |
while(more): |
View grid.js
import React from 'react'; | |
import PropTypes from 'prop-types'; | |
import MuiGrid from 'material-ui/Grid'; | |
import { withStyles } from 'material-ui/styles'; | |
import classNames from 'classnames'; | |
const styles = (theme) => { | |
// console.log(theme.spacing.unit); | |
// theme.spacing.unit * 2 |
View divirod_survey_sync.py
import csv | |
import requests # installed (pip install requests) | |
import json | |
INPUT_FILE = './data/diving-rods-survey-data-2017-04-24.csv' | |
BATCH_SIZE = 100 | |
PREF_API_URL = 'http://localhost:9090/api/rest/v1.0/preferences' | |
def submit_pref_data(data): |
View react_img_loader.js
// Simple React Class for managing the loading state of an image asset | |
var ImgLoader = React.createClass({ | |
loadHandler: function () { | |
this.setState({img_loaded: true}); | |
}, | |
getInitialState: function () { | |
return { | |
loading_src: 'https://dummyimage.com/700x700/ccc/ffffff.png&text=loading...', | |
img_loaded: false | |
} |
View test.py
""" | |
Initial draft of helper code to create an 700x700 instagrammable image coponsed of other cover images. | |
""" | |
from PIL import Image | |
from PIL import ImageFont | |
from PIL import ImageDraw | |
from math import ceil |