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
import qualified Data.Set as S | |
type State = String | |
type Letter = String | |
type Alphabet = S.Set Letter | |
{- | |
data Automaton = Automaton { auto_state :: S.Set State | |
, auto_alphabet :: Alphabet | |
, auto_delta :: (State -> Letter -> State) |
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
Hej! | |
Som en trevlig present så här i början på det nya året kommer kallelsen till Sverok Nedre Norrlands Årsmöte. Just du får det här brevet för att du varit medlem i en Sverok-förening med säte i Nedre Norrland (Jämtland och Västernorrland) under 2006/2007. | |
Årsmöte | |
Sverok Nedre Norrland har årsmöte den 7:e till 9:e mars. I år kommer vi att använda Själevads Fritidsgård som möteslokal. | |
Mer information om årsmötet kommer på hemsidan efter helgen, men använd gärna forumet redan nu om det är något du undrar. | |
http://nn.sverok.se/ |
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 | |
# Sends HUP to the parent Gunicorn | |
import subprocess | |
for row in subprocess.check_output('ps axo ppid,pid,comm | grep gunicorn', shell=True).splitlines(): | |
parts = row.strip().split() | |
if parts[0] == '1': # Parent | |
subprocess.call(['kill', '-HUP', parts[1]]) | |
print 'gunicorn is now reloading your code.' |
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
module Main where | |
import System.Log.Logger | |
import System.Log.Handler.Simple | |
import System.Log.Handler (setFormatter) | |
import System.Log.Formatter | |
main = do | |
-- Initialize loggers |
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
" Inget pip goddamit! | |
set visualbell | |
syntax on | |
set autoindent | |
set nosmartindent | |
set tabstop=4 | |
set expandtab | |
set shiftwidth=4 | |
set hlsearch " Higliht searched words |
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
module Main where | |
data FzBz = Fizz | Buzz | FizzBuzz | N Int | |
instance Show FzBz where | |
show Fizz = "Fizz" | |
show Buzz = "Buzz" | |
show FizzBuzz = "FizzBuzz" | |
show (N x) = show x |
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
( 33/185) upgrading firefox [#######################################################] 100% | |
New optional dependencies for firefox | |
gstreamer0.10-bad-plugins: aac, vp8 and opus decoding [installed] | |
gstreamer0.10-base-plugins: vorbis decoding, ogg demuxing [installed] | |
gstreamer0.10-good-plugins: webm and mp4 demuxing [installed] | |
gstreamer0.10-ugly-plugins: h.264 decoding |
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
<!DOCTYPE html> | |
<html> | |
<body> | |
<h1>My web page</h1> | |
This document has a heading and some text. <em>This sentence is emphasized.</em> | |
<script src="main.js" type="text/javascript"></script> | |
</body> | |
</html> |
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
# Lets build a dictionary of people, like this: | |
names = [u'{} {}'.format(f.lower(),e.lower()) for (f,e) in Participant.objects.values_list('fname', 'ename').order_by('fname', 'ename')] | |
autocompletion_tree = defaultdict(list) | |
for (i,n) in enumerate(names): | |
s = '' | |
for c in n: | |
s += c | |
autocompletion_tree[s].append(i) | |
# Purge it! |
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
O | |
-|- | |
||| | |
||| | |
- | |
||| | |
| | | |
- - | |
http://www.youtube.com/watch?v=vTnSf8OjYQ0 |