An alternate view of the solar terminator.
This file contains hidden or 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
diff --git a/page.c b/page.c | |
index 07ac9d5..69374c4 100644 | |
--- a/page.c | |
+++ b/page.c | |
@@ -30,7 +30,7 @@ | |
static caddr_t startAddr = (caddr_t) 0; | |
#if ( !defined(sgi) && !defined(_AIX) ) | |
-extern int sys_nerr; | |
+/*extern int sys_nerr;*/ |
This file contains hidden or 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 qualified Data.Map as M | |
import Data.List (find) | |
import Data.Maybe (fromMaybe) | |
firstNonRep :: String -> Maybe Char | |
firstNonRep xs = let m = M.fromListWith (+) . map (\c -> (c,1)) $ xs | |
lookup = flip (M.findWithDefault 0) m | |
in find ((== 1) . lookup) xs | |
main = print $ case firstNonRep "faabcbcdee" of |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>API</title> | |
<link rel="stylesheet" href="sp://import/css/adam.css"> | |
<style> | |
body { | |
-webkit-box-orient: vertical; | |
display: -webkit-box; |
This file contains hidden or 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
_ = sp.require('underscore'); | |
sp.core.library.getTracks().length | |
// Versus: | |
// Total number of tracks in "library" = all playlists | |
_.reduce(sp.core.library.getPlaylists(), function (a, x) { return a + _.reject(_.map(_.range(x.length || 0), function (i) { return x.getTrack(i); }), function (t) { return t.isLocal || t.isAd || t.isPlaceholder || !t.availableForPlayback; }).length; }, 0) | |
// Number of unique tracks (unique track URIs) |
Skärmdump från http://www.svtplay.se/video/1680485/del-6-av-10@18:56.
Första delen av koden är från POIU: Parallel Operator on Independent Units.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 requests | |
import xmltodict | |
def find_post_by_photo_url(photo_url, start=0, num=50): | |
total = start + 1 | |
while start < total: | |
r = requests.get('https://marklovejoydotcom.tumblr.com/api/read', params={'start': start, 'num': num}) | |
r.raise_for_status() |
This file contains hidden or 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
with open('gymnastics.in', 'r') as fin: | |
K, N = map(int, fin.readline().split()) | |
P = {k: {int(n): i for i, n in enumerate(fin.readline().split())} | |
for k in range(K)} | |
ans = 0 | |
for n1 in range(1, N + 1): | |
for n2 in range(1, N + 1): | |
if n1 == n2: |
OlderNewer