Skip to content

Instantly share code, notes, and snippets.

View jaredlockhart's full-sized avatar

Jared Lockhart jaredlockhart

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>untitled - iodide</title>
<link rel="stylesheet" type="text/css" href="iodide.iodide-server.css">
</head>
<body>
<script id="jsmd" type="text/jsmd">
%% meta
{% component card title edit_url body %}
<h3>{{ title }}</h3>
<a href="{{ edit_url }}">Edit</a>
<p>{{ body }}</p>
{% endcomponent %}
{% card
title="Overview"
edit_url={% url wahtever %}
In [4]: data
Out[4]:
{'description': 'There pretty page piece not tend however generation. Beat no tree never run garden body.\nSkill old main. Care itself become set through. But building specific explain option.',
'experiment': <Experiment: Optimized holistic project>,
'is_control': True,
'name': 'Secured grid-enabled artificial intelligence',
'ratio': 3,
'slug': 'secured-grid-enabled-artificial-intelligence',
'value': 10}
"events":[[79953,"normandy","unenroll","preference_study","pref-flip-activity-stream-60-beta-wide-layout-bug-1443649",{"didResetValue":"false","reason":"user-preference-changed-sideload"}]]}
<div class="card">
<div class="card-title">
<h4>Section Title</h4>
</div>
<p>Body content blah blah blah.</p>
</div>
class ProjectEditMixin(object)
model = Project
form_class = ProjectForm
template_name = 'projects/edit.html'
def get_success_url(self):
return reverse('projects-detail', kwargs={'slug': self.object.slug})
class ProjectCreateView(ProjectEditMixin, CreateView):
from experimenter.experiments.tests.factories import *
def refresh():
Experiment.objects.all().delete()
for i in range(10):
ExperimentFactory.create_with_variants()
Experiment.objects.update(status=Experiment.STATUS_PENDING)
refresh()
48 it('should send experiment to normandy and send accept to experimenter', async () => {
49 const store = mockStore({
50 app: {requests: {get: () => ({})}},
51 });
52
53 const experiment = ExperimentFactory.build();
54 const recipeResponse = createRecipeResponse(experiment);
55
56 fetchMock.mock('/api/v2/recipe/', createRecipeResponse, {method: 'POST'});
57 fetchMock.mock(experiment.accept_url, 'accepted', {method: 'PATCH'});
38 it('should send experiment to normandy and send accept to experimenter', async () => {
39 const experiment = ExperimentFactory.build();
40 const createRecipeResponse = {};
41 fetchMock.mock('/api/v2/recipe/', createRecipeResponse, {method: 'POST'});
42 fetchMock.mock(experiment.accept_url, 'accepted', {method: 'PATCH'});
43
44 const dispatch = action => {
45 console.log('dispatch called');
46 switch (typeof action) {
47 case "function":
1st startup reading from local normandy:
OpenGL compositor Initialized Succesfully.
Version: 2.1 ATI-1.51.8
Vendor: ATI Technologies Inc.
Renderer: AMD Radeon R9 M370X OpenGL Engine
FBO Texture Target: TEXTURE_2D
1505937987761 extensions.shield-recipe-client.preference-experiments DEBUG PreferenceExperiments.getAllActive()
1505937987872 Toolkit.Telemetry WARN TelemetryEnvironment::setExperimentActive - the experiment type was truncated.
1505937987873 extensions.shield-recipe-client.preference-experiments DEBUG PreferenceExperiments.startObserver(pref-flip-quantum-css-style-r1-1381147)