Skip to content

Instantly share code, notes, and snippets.

{
"meta": {
"tags": [
"Profile_Segmentation",
"Mosaic",
"Profile_Attributes",
"TypeP",
"mosaic",
"no_ask",
"Mosaic Type",
def get_twitter_panelist_by_pmxid(self, pmx_id):
with session_scope(self.db_session) as session:
try:
panelist = session.query(Panelists).filter_by(
medium='twitter',
pmxid=pmx_id).one()
except NoResultFound:
panelist = None
session.expunge_all()
return panelist
@fudge.patch('twanel.tasks.pgm')
def test_task_retried_on_twitter_error(self, pgm):
err = fudge.Fake('error').is_a_stub()
err.fp.expects('read').returns('{}')
err.code = 500
exc = TwitterHTTPError(
err,
'friends/list',
"",
Hi Kerin,
I hope you're well.
Please excuse me for emailing you out of the blue. My name is Corinna, I am the Head of Business Operations at Smarkets.
I saw that you haven't been visiting our site for a while, maybe because there was something you didn't like about our service and that we should work on.
As we're a small business we try to stay close to our users, meet as many as we can face to face and listen to anything you may have to say about Smarkets, answer any questions you may have or simply have a chat.
(function($){
$(function(){
...
});
})($ || django.jQuery);
@kerin
kerin / gist:6609588
Created September 18, 2013 14:03
geodjango puppet
node "default" {
stage { 'first':
before => Stage['main'],
}
class { 'apt_update':
stage => first,
}
class { 'apt': }
@kerin
kerin / gist:6609568
Created September 18, 2013 14:02
geodjango ansible
---
- hosts: all
user: vagrant
sudo: yes
tasks:
- name: update apt
apt: update_cache=yes cache_valid_time=86400
- name: install base packages
in JS:
/* Translators: test javascript hint 1 */
$('<h2>').text(pgettext('Favourites view title', 'Favourites')).attr('class', 'sticky').insertBefore($(this.el));
in generated .po file:
#. Translators: test javascript hint 1
#: assets/js/modules/views.js:91
<html>
<body>
<h1>test</h1>
</body>
</html>
<video loop="loop" poster="/static/video/projects/youview/poster.jpg" autoplay="autoplay">
<source src="/static/video/projects/youview/demo_high.mp4" type="video/mp4; codecs=&quot;avc1.64001E, mp4a.40.2&quot;">
<source src="/static/video/projects/youview/demo_main.mp4" type="video/mp4; codecs=&quot;avc1.4D401E, mp4a.40.2&quot;">
<source src="/static/video/projects/youview/demo_baseline.mp4" type="video/mp4; codecs=&quot;avc1.42E01E, mp4a.40.2&quot;">
<source src="/static/video/projects/youview/demo.webm" type="video/webm; codecs=&quot;vp8, vorbis&quot;">
</video>