This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { applyMiddleware, combineReducers, compose, createStore } from 'redux'; | |
import thunkMiddleware from 'redux-thunk'; | |
import { connectRouter, push, routerMiddleware } from 'connected-react-router'; | |
import { createBrowserHistory } from 'history'; | |
const history = createBrowserHistory({}); | |
const createRootReducer = (browserHistory) => combineReducers({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# Generated by Django 1.11.11 on 2018-04-11 13:36 | |
from __future__ import unicode_literals | |
from django.db import migrations | |
from pontoon.base.models import TranslatedResource | |
def calculate_all_stats(apps, schema_editor): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# My version: | |
my_list = [ | |
'hello', | |
'world', | |
+ 'what is up?', | |
] | |
# vs: | |
my_list = [ | |
'hello', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT COUNT(id) | |
FROM base_translation | |
WHERE approved = FALSE | |
AND fuzzy = FALSE | |
AND date < ( | |
SELECT GREATEST(bt.date, bt.approved_date) | |
FROM base_translation bt | |
WHERE bt.approved = TRUE | |
AND bt.entity_id = base_translation.entity_id | |
AND bt.locale_id = base_translation.locale_id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
from configman import Namespace | |
from configman.converters import class_converter | |
from socorro.app import generic_app | |
from socorro.external.es.super_search_fields import ( | |
SuperSearchFields | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Script config | |
WORKSPACE=~/mozilla/workspace | |
GITHUB_USER=adngdb | |
# Secrets | |
DATABASE_PASSWORD= | |
BOTO_SECRET_ACCESS_KEY= | |
BOTO_ACCESS_KEY= | |
# Requirements |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"type": "object", | |
"description": "schema of a processed crash from Socorro", | |
"definitions": { | |
"frames": { | |
"type": "object", | |
"properties": { | |
"frame": { | |
"type": "integer", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
import elasticsearch | |
from elasticsearch import helpers | |
from socorrolib.lib.datetimeutil import utc_now | |
def dl_es_data(es_index, es_doctype, date): | |
"""Return all documents of an index. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
import requests | |
import time | |
def measure_supersearch(base_url): | |
today = datetime.datetime.utcnow().date() | |
two_months_ago = today - datetime.timedelta(weeks=8) | |
urls = ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
release beta aurora nightly | |
---------- --------- ------- -------- --------- | |
2014-12-25 69952943 1738103 66862 45328 | |
2014-12-26 79407038 2012413 75219 48960 | |
2014-12-27 74701774 1957618 68368 47283 | |
2014-12-28 73474760 1755038 67833 47795 | |
2014-12-29 94104371 2334070 88696 54151 | |
2014-12-30 90880260 2315405 87093 54051 | |
2014-12-31 76797584 2135065 75351 48533 | |
2015-01-01 69296349 1822021 65846 46986 |
NewerOlder