Firstly install Brew on your MAC
- ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Then install PHP
- brew update
- brew tap homebrew/dupes
- brew tap homebrew/php
- brew install php56
function sync() { | |
var id="XXXXXXXXXX"; // CHANGE - id of the secondary calendar to pull events from | |
var today=new Date(); | |
var enddate=new Date(); | |
enddate.setDate(today.getDate()+7); // how many days in advance to monitor and block off time | |
var secondaryCal=CalendarApp.getCalendarById(id); | |
var secondaryEvents=secondaryCal.getEvents(today,enddate); |
function sync() { | |
var id="XXXXXXXX"; // CHANGE - id of the secondary calendar to pull events from | |
var secondaryCal=CalendarApp.getCalendarById(id); | |
var today=new Date(); | |
var enddate=new Date(); | |
enddate.setDate(today.getDate()+30); // how many days in advance to monitor and block off time | |
var secondaryEvents=secondaryCal.getEvents(today,enddate); |
Firstly install Brew on your MAC
Then install PHP
// These two need to be declared outside the try/catch | |
// so that they can be closed in the finally block. | |
HttpURLConnection urlConnection = null; | |
BufferedReader reader = null; | |
// Will contain the raw JSON response as a string. | |
String forecastJsonStr = null; | |
try { | |
// Construct the URL for the OpenWeatherMap query |
function listFilesInFolder() { | |
var folder = DocsList.getFolder("Maudesley Debates"); | |
var contents = folder.getFiles(); | |
var file; | |
var data; | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
sheet.clear(); | |
#!/usr/bin/ruby | |
# | |
# This work is licensed under a Creative Commons Attribution 3.0 Unported License. | |
# http://creativecommons.org/licenses/by/3.0/ | |
# | |
# With some slight modifications, this script should create | |
# a new discount code for each of the 'live' events which are | |
# owned by the user (who is identified by the user_key value). | |
# | |
# See the above license info and Eventbrite API terms for usage limitations. |
Definition: A virtual or physical representation of having accomplished something. These are often viewed as rewards in and of themselves.
Example: a badge, a level, a reward, points, really anything defined as a reward can be a reward.
Definition: A dynamic in which to succeed, one must return at a predefined time to take some action. Appointment dynamics are often deeply related to interval based reward schedules or avoidance dyanmics.
#!/usr/bin/python | |
# | |
# Monte Carlo simulation of the payoffs to angel investing. | |
# | |
# Assume a pool of N different investors, each investing in D deals, | |
# with a fixed time horizon and a fixed distribution of payoffs. | |
# Randomly simulate each investor's total payoff, then compute the | |
# mean and std dev of all IRRs in the overall pool. | |
# | |
# This gives an individual angel an idea of what kind of payoff & |