Skip to content

Instantly share code, notes, and snippets.

View stefanor's full-sized avatar

Stefano Rivera stefanor

View GitHub Profile
#! /usr/bin/perl -W
use strict;
use FileHandle;
use Fcntl qw(:DEFAULT O_DIRECT);
use POSIX;
#use Sys::Mmap;
use integer;
# we have several drives in the array, in different states each
# we keep in in @drv, in no particular order
diff --git a/lib/Map.py b/lib/Map.py
index 1ed1685..28895e8 100644
--- a/lib/Map.py
+++ b/lib/Map.py
@@ -51,7 +51,7 @@ class Map():
def loadMap(self, filepath):
- f = open(filepath)
+ f = open(filepath, 'U')
##########################################################################
#
# Copyright (c) 2005 Imaginary Landscape LLC and Contributors.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
@stefanor
stefanor / worker.py
Last active December 19, 2015 07:49
#!/usr/bin/env python
import os
import threading
import time
class Job(object):
def __init__(self, name, dependants=None):
self.name = name
5.4T total
645G /srv/ftp/pub/linux/ubuntu
499G /srv/ftp/pub/linux/scientific
332G /srv/ftp/pub/bsds/openbsd
329G /srv/ftp/pub/linux/ubuntu-unofficial-packages-dvd
318G /srv/ftp/pub/linux/fedora
270G /srv/ftp/pub/bsds/freebsd
240G /srv/ftp/pub/linux/debian
196G /srv/ftp/pub/FreeBSD/ports
190G /srv/ftp/pub/linux/debian-isos
============================================================================= FAILURES ==============================================================================
__________________________________________________________________________ test_longdouble __________________________________________________________________________
def test_longdouble():
ffi = FFI()
ffi.cdef("long double sinl(long double x);")
lib = ffi.verify('#include <math.h>')
for input in [1.23,
ffi.cast("double", 1.23),
ffi.cast("long double", 1.23)]:
Detected build compat level 3
╔═════════════════════════════════════════════════════════════════════════════╗
║ asyncserver 0.17 ║
╚═════════════════════════════════════════════════════════════════════════════╝
┌─────────────────────────────────────────────────────────────────────────────┐
│ Build deploy virtualenv │
└─────────────────────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────────────────────┐
│ Build app virtualenv │
└─────────────────────────────────────────────────────────────────────────────┘
pypy_1.9+hg57779+dfsg-0~ppa1~ubuntu12.04_amd64.deb
──────────────────────────────────────────────────
new debian package, version 2.0.
size 10355676 bytes: control archive=1679 bytes.
1227 bytes, 25 lines control
885 bytes, 12 lines md5sums
529 bytes, 33 lines * postinst #!/bin/sh
320 bytes, 27 lines * prerm #!/bin/sh
34 bytes, 1 lines triggers
This file has been truncated, but you can view the full file.
sbuild (Debian sbuild) 0.63.2 (18 Aug 2012) on dvorak.kardiogramm.lan
╔══════════════════════════════════════════════════════════════════════════════╗
║ pypy 1.9+hg57779+dfsg-0~ppa1~ubuntu12.04 (amd64) 08 Oct 2012 11:02 ║
╚══════════════════════════════════════════════════════════════════════════════╝
Package: pypy
Version: 1.9+hg57779+dfsg-0~ppa1~ubuntu12.04
Source Version: 1.9+hg57779+dfsg-0~ppa1~ubuntu12.04
Distribution: precise
#!/usr/bin/env python
def memoize(f):
def wrapped(self):
attr_name = '_memoized_%s' % f.func_name
if not hasattr(self, attr_name):
setattr(self, attr_name, f(self))
return getattr(self, attr_name)
return wrapped