- How media works
- There's a difference in positioning: in-depth vs breaking news
- Crunch in talent, margin pressures. Not enough staff to 'break news'
- Sources of breaking news: agencies, in-house, competition, social media
- Increasingly, social media is a dominant source
- How can we source social media data at scale
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
*.pyc |
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
@echo off | |
REM = """ | |
REM python -x skipped that first line... | |
REM make sure that this file is saved with Windows newlines | |
REM make sure to change the next lines to whatever this file is called: | |
set FOLDER=D:/Apps/Misc | |
python -x %FOLDER%/o.cmd %* | |
if errorlevel == 1 goto changedir | |
goto end |
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
// Textarea maxlength | |
// Ensures that textarea's maxlength is validated | |
// | |
// (c) S Anand, 2010, MIT License | |
// Credits: http://yelotofu.com/2009/12/jquery-textarea-max-length/ | |
// Credits: http://stackoverflow.com/questions/43569/max-length-for-html-text-areas | |
(function() { | |
var ignore = [8,9,13,33,34,35,36,37,38,39,40,46]; | |
function limit(event) { |
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
# See http://www.s-anand.net/blog/shortening-sentences/ | |
# Removing vowels from words reduces the readability, but shrinks text by 18% [column 1] | |
# Removing only single vowels (e.g. read -> read, but yet -> yt) shrinks by 14% [column 2] | |
# Is the difference worth it? Here are some examples: | |
abbrviatn abbrviation | |
ablitn ablition | |
ablits ablities | |
abnd abound | |
abndng aboundng |
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 win32gui, time, os.path | |
filename = os.path.join(os.path.dirname(__file__), 'applog.txt') | |
out = open(filename, 'a') | |
while True: | |
title = win32gui.GetWindowText(win32gui.GetForegroundWindow()) | |
out.write(time.strftime('%a %d-%m-%Y %H:%M:%S') + '\t' + title + '\n') | |
out.flush() | |
time.sleep(30) |
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
''' | |
Usage: viz.py INPUT.csv [template.html] > OUTPUT.xhtml | |
''' | |
import re | |
import math | |
import logging | |
import datetime | |
import operator | |
from tornado import template |
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
body { | |
background: white; | |
color: #444; | |
font-family: Georgia, serif; | |
font-size: 11pt; | |
margin: 15px auto; | |
max-width: 850px; | |
line-height: 1.5; | |
} |
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
// Internal color conversion | |
// Converts `#ffffff` to `(255, 255, 255)` | |
function _colornum(color) { | |
var l = color.length; | |
return [ | |
parseInt(color.slice(l-6,l-4), 16), | |
parseInt(color.slice(l-4,l-2), 16), | |
parseInt(color.slice(l-2,l-0), 16) | |
]; | |
} |
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
{"iso_language_code": "da", "to_user_name": "Jishnu", "to_user_id_str": "110358179", "profile_image_url_https": "https://si0.twimg.com/profile_images/1761677446/2850384465_604be38694_b__copy__normal.jpg", "from_user_id_str": "15649930", "text": "@jishnu7 Automated Data Analysis talk By S Anand is at A1 #PyconIndia2012", "from_user_name": "Ramakrishna Reddy", "in_reply_to_status_id_str": "252282073249902593", "profile_image_url": "http://a0.twimg.com/profile_images/1761677446/2850384465_604be38694_b__copy__normal.jpg", "id": 252284135371067392, "to_user": "jishnu7", "source": "<a href="http://twitter.com/">web</a>", "in_reply_to_status_id": 252282073249902593, "id_str": "252284135371067392", "from_user": "ramkrsna", "from_user_id": 15649930, "to_user_id": 110358179, "geo": null, "created_at": "Sun, 30 Sep 2012 05:49:59 +0000", "metadata": {"result_type": "recent"}} | |
{"iso_language_code": "da", "to_user_name": null, "to_user_id_str": "0", "profile_image_url_https": "https://si0.twimg.com/pr |
OlderNewer