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
use("aux", "set") | |
-- Connects "start_flag" and "end_flag" with a road with as many flags set as | |
-- possible. Returns true when a road is build, false on error. This is | |
-- implemented as a straightforward A* implementation. | |
function connect_flags(start_flag, end_flag) | |
local start_field = start_flag.fields[1] | |
local end_field = end_flag.fields[1] | |
local closed_set = Set:new() |
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 | |
# encoding: utf-8 | |
import os.path | |
from subprocess import Popen, PIPE, STDOUT | |
from colorama import Fore, Back, Style | |
from shell_grunt import WorkItem, Executor | |
import sys |
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
## Fix LF in translation branch. | |
bzr switch translations && bzr pull | |
utils/remove_lf_in_translations.py | |
bzr add po | |
bzr commit -m "Fixed LF in translations." || true | |
bzr push | |
# Merge translations. | |
bzr switch trunk && bzr pull | |
bzr merge lp:~widelands-dev/widelands/translations |
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
Making check in libasn1parser | |
make[1]: Entering directory `/tmp/asn1c_vlm/libasn1parser' | |
make[1]: Nothing to be done for `check'. | |
make[1]: Leaving directory `/tmp/asn1c_vlm/libasn1parser' | |
Making check in libasn1fix | |
make[1]: Entering directory `/tmp/asn1c_vlm/libasn1fix' | |
make check_fixer | |
make[2]: Entering directory `/tmp/asn1c_vlm/libasn1fix' | |
gcc -DHAVE_CONFIG_H -I. -I.. -I../libasn1parser -g -O2 -Wall -Wshadow -Wcast-qual -Wcast-align -Wchar-subscripts -Wmissing-prototypes -Wmissing-declarations -MT check_fixer.o -MD -MP -MF .deps/check_fixer.Tpo -c -o check_fixer.o check_fixer.c | |
mv -f .deps/check_fixer.Tpo .deps/check_fixer.Po |
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
use("aux", "formatting") | |
function image_line(image, count, text) | |
local imgs={} | |
for i=1,count do | |
imgs[#imgs + 1] = image | |
end | |
local imgstr = table.concat(imgs, ";") | |
if text ~= nil then |
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
use("aux", "formatting") | |
return { | |
text = | |
rt( | |
h1("The Barbarian Lumberjack") .. | |
h2("General:") .. | |
p(_ | |
[[The lumberjack clears the landscape from trees enabling you to build new houses.<br> |
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
type Node | |
name::UTF8String | |
n::Set{Node} | |
Node(name) = new(name, Set{Node}()) | |
end | |
typealias Graph Dict{UTF8String, Node} | |
function get(G::Graph, name) |
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 | |
# encoding: utf-8 | |
# | |
def mean(l): | |
return sum(l, 0.)/len(l) | |
def centrality_mean(G, v): | |
dists = {} | |
next = {v} |
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
#include <set> | |
#include <string> | |
#include <map> | |
#include <fstream> | |
#include <iostream> | |
#include <vector> | |
#include <stdint.h> | |
using namespace std; |
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
-- iterfib.cc -- | |
#include <iostream> | |
#include <stdint.h> | |
using namespace std; | |
uint64_t fib(int k) { | |
uint64_t ln = 1; | |
uint64_t n = 1; |
OlderNewer