Skip to content

Instantly share code, notes, and snippets.

View astro's full-sized avatar

Astro astro

View GitHub Profile
-- I didn't read
-- http://www.cs.tufts.edu/~nr/comp150fp/archive/richard-bird/sudoku.pdf
-- too carefully.
import Array
import Control.Monad (forM_)
import Data.List (delete, intercalate)
import System.CPUTime (getCPUTime)
import Control.Parallel.Strategies
# http://www.cs.toronto.edu/~roweis/data/mnist_{train,test}{0..9}.jpg
require 'RMagick'
include Magick
require 'ai4r'
W, H = 14, 14
IW, IH = 28, 28
class Picture
attr_reader :digit
-- not ready !!!1!
import Random
data Point
-- X, Y
= Float Float
deriving (Show, Eq)
data Values = None
-- Point1, Angle1, Angle2, Point2
# -*- coding: utf-8 -*-
require 'nokogiri'
require 'iconv'
DOC = <<EOD
<?xml version="1.0" encoding="UTF-8"?>
<r>Gauß</r>
EOD
pp = Nokogiri::XML::SAX::PushParser.new
-- |Based on http://cvs.silcnet.org/source/lib/silccrypt/silchash.c#L438
module BubblePrint where
import Data.Char (ord, chr)
import Data.Bits ((.&.), shiftR)
import Prelude hiding ((>>), (/))
(&) = (.&.)
(>>) = shiftR
(%) = mod
cave@storage:~$ /root/riak/rel/riak/bin/riak console
Exec: /root/riak/rel/riak/erts-5.7.5/bin/erlexec -boot /root/riak/rel/riak/releases/0.10.1/riak -embedded -config /root/riak/rel/riak/etc/app.config -args_file /root/riak/rel/riak/etc/vm.args -- console
Root: /root/riak/rel/riak
Erlang R13B04 (erts-5.7.5) [source] [64-bit] [smp:4:4] [rq:4] [async-threads:5] [kernel-poll:true]
** Found 0 name clashes in code paths
=INFO REPORT==== 6-May-2010::22:18:27 ===
alarm_handler: {set,{system_memory_high_watermark,[]}}
<?xml version='1.0' encoding='UTF-8'?>
<feed s:id="8310107" xmlns="http://www.w3.org/2005/Atom" xmlns:s="http://superfeedr.com/xmpp-superfeedr-ext">
<link rel="self" href="http://superfeedr.com/dummy.xml"/>
<http_code xmlns="http://superfeedr.com/xmpp-superfeedr-ext">200</http_code>
<last_modified xmlns="http://superfeedr.com/xmpp-superfeedr-ext">2010-05-24T22:40:56+00:00</last_modified>
<etag xmlns="http://superfeedr.com/xmpp-superfeedr-ext">&quot;c1af683416ed8cd5852678a5b2840dd5&quot;</etag>
<number_of_new_entries xmlns="http://superfeedr.com/xmpp-superfeedr-ext">1</number_of_new_entries>
<last_error_message xmlns="http://superfeedr.com/xmpp-superfeedr-ext">7726B in 0.030275s, 1 new entries</last_error_message>
<last_fetch xmlns="http://superfeedr.com/xmpp-superfeedr-ext">2010-05-24T22:40:56Z</last_fetch>
<title>The Dummy Time Feed</title>
<iq type="set" from="track.superfeedr.com" to="firehoser.superfeedr.com" id="Component-871949090">
<feed xmlns="http://superfeedr.com/xmpp-superfeedr-ext" id="8282637">
<url>http://superfeedr.com/track/movie</url>
</feed>
<pubsub xmlns="http://jabber.org/protocol/pubsub">
<publish node="8282637">
<item>
<entry xmlns:geo="http://www.georss.org/georss" xmlns:as="http://activitystrea.ms/spec/1.0/" xmlns:sf="http://superfeedr.com/xmpp-pubsub-ext" xmlns="http://www.w3.org/2005/Atom">
<id>http://loveleader.tumblr.com/post/749928806</id>
<published>2010-06-29T15:19:33+00:00</published>
We couldn’t find that file to show.
From slide 22 of http://www.fischmarkt.de/2010/05/very_high_performance_websites_the_next.html Many of these can be checked with the YSlow Firebug extension.
* Make fewer HTTP requests
* Use a Content Delivery Network (CDN)
* Add Expires headers
* Compress components with gzip
* Put CSS at top
* Put JavaScript at bottom
* Avoid CSS expressions
* Make JavaScript and CSS external