README is empty
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
// If you're looking at this, you probably know more about code than I do. | |
// I apologize for the messy code. I'm a journalist, not a developer. And this is an experiment, not a polished piece of software. | |
// If you'd like to make me aware of problems with the code, you can write me to [email protected]. | |
// countries missing in OWID dataset (dec 29): KIR, PRK, FSM, NRU, PLW, TON, TKM, TUV | |
var datafound = []; | |
var datamissing = []; | |
var matched = []; |
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
// how to use this | |
// 1. create a new script on https://script.google.com/home and paste over this code | |
// 2. define which emails you want to archive and after which delay (lines 7,8) | |
// 3. add a «project trigger» to define how often this script should be executed (e.g. every day at midnight) | |
function auto_archive_mails() { | |
var label = GmailApp.getUserLabelByName("News Briefings"); // Emails with which label do you want auto-archived? | |
var delayDays = 3 // After how many days do you want your emails auto-archived? | |
var maxDate = new Date(); | |
maxDate.setDate(maxDate.getDate()-delayDays); |
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
#!/usr/bin/env python | |
# assuming a csv file with a name in column 0 and the image url in column 1 | |
import urllib | |
filename = "images" | |
# open file to read | |
with open("{0}.csv".format(filename), 'r') as csvfile: |
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
// test to get logged in user's name for further use | |
$.getJSON("http://tlinkstimeline.appspot.com/loggedinuser?callback=?", function(loggedinuser){ | |
if (loggedinuser) { | |
var thename = loggedinuser; | |
console.log("hello " + thename); | |
}; | |
}); |
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
function countWords() { | |
var wordcount = 0; | |
var text = document.wordcounter.allthosewords.value; | |
var words = text.match(/\w+\W*/g); | |
if (words) { | |
wordcount = words.length; | |
} | |
} | |
function tellCount() { |
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
function countIt() { | |
var wordcount = 0; | |
var text = document.wordcounter.allthosewords.value; | |
for (i = 0; i < text.length; i++) { | |
if (text[i] === " ") { | |
wordcount++; | |
} | |
// special code needed for the smartasses that type in only one word | |
// special code needed for the smartasses that end their text with one or more spaces |