ESPN's hidden API endpoints
Latest News: http://site.api.espn.com/apis/site/v2/sports/football/college-football/news
Latest Scores: http://site.api.espn.com/apis/site/v2/sports/football/college-football/scoreboard
Latest News: http://site.api.espn.com/apis/site/v2/sports/football/college-football/news
Latest Scores: http://site.api.espn.com/apis/site/v2/sports/football/college-football/scoreboard
Author: Chris Lattner
| import os | |
| import subprocess | |
| from subprocess import Popen, PIPE | |
| #The directory to sync | |
| syncdir="/home/homeassistant/.homeassistant/" | |
| #Path to the Dropbox-uploaded shell script | |
| uploader = "/home/homeassistant/.homeassistant/extraconfig/shell_code/dropbox_uploader.sh" | |
| #If 1 then files will be uploaded. Set to 0 for testing |
| package com.github.shkesar.JMusic; | |
| import javafx.application.Application; | |
| import javafx.scene.Scene; | |
| import javafx.scene.control.*; | |
| import javafx.scene.layout.BorderPane; | |
| import javafx.scene.layout.HBox; | |
| import javafx.scene.layout.VBox; | |
| import javafx.scene.media.Media; | |
| import javafx.scene.media.MediaPlayer; |
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
| // Since `overlapArea` function is monotonic increasing, we can perform a | |
| // simple bisection search to find the distance that leads to an overlap | |
| // area within epsilon of the desired overlap. | |
| function distanceForOverlapArea(r1, r2, desiredOverlap) { | |
| // Ensure r1 <= r2 | |
| if (r1 > r2) { | |
| var temp = r2; | |
| r2 = r1; | |
| r1 = temp; | |
| } |
| import XCPlayground | |
| import Foundation | |
| import UIKit | |
| class Channel<T> | |
| { | |
| var stream: Array<T> | |
| let queue: dispatch_queue_t | |
| let semaphore: dispatch_semaphore_t | |
| const I = x => x | |
| const K = x => y => x | |
| const A = f => x => f (x) | |
| const T = x => f => f (x) | |
| const W = f => x => f (x) (x) | |
| const C = f => y => x => f (x) (y) | |
| const B = f => g => x => f (g (x)) | |
| const S = f => g => x => f (x) (g (x)) | |
| const S_ = f => g => x => f (g (x)) (x) | |
| const S2 = f => g => h => x => f (g (x)) (h (x)) |
| ; Annie Cherkaev, Dec 29th 2015 | |
| #lang racket | |
| ; An implementation of depth first search | |
| ; Trees are represented as lists, where the first element is the 'name' of the node, and the rest of the list is the children of that node | |
| ; ie: a | |
| ; / \ | |
| ; b c | |
| ; is represented as (a (b) (c)) | |
| ; |