; Roto-life (rotozooming game of life, with blur -- in 256 bytes!)
; Game of life algorithms by INT-E
; Decyphering and adaptation of game of life, and everything else by Bonz
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
#!/bin/sh | |
# | |
# git-snapshot.sh - save junk code to a snapshots branch | |
# | |
# USAGE: git-snapshot.sh [-m message] [files...] | |
# | |
# Run `git add files` and then create a new commit on branch 'snapshot' | |
# with two parents, the previous snapshot and HEAD. | |
# | |
# If -m is given, the 'message' is used as the commit message; otherwise |
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 | |
# | |
# GTester-compatible main program for pyunit | |
# | |
# Copyright (C) 2011 Red Hat, Inc. | |
# Author: Paolo Bonzini <[email protected]> | |
# | |
# Permission to use, copy, modify, and/or distribute this software for any | |
# purpose with or without fee is hereby granted, provided that the above | |
# copyright notice and this permission notice appear in all copies. |
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
from datetime import date | |
# per ogni festa che cade di: | |
# sabato, domenica, -1 punto (niente ponte e niente festa) | |
# giovedi', martedi', +4 punti (ponte!!) | |
# lunedi', venerdi', +3 punti (festa dopo fine settimana) | |
# mercoledi +1 punti (solo festa) | |
punteggio = [3, 4, 1, 4, 3, -1, -1] | |
feste = [(1,1), # capodanno | |
(6,1), # epifania |
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
# Copyright 2014 Paolo Bonzini | |
# API inspired by py-simple-bdd. | |
# License: X11 (MIT) | |
class Variable(object): | |
def __init__(self, name): | |
self._name = name | |
self._hash = hash(name) | |
self._node = Node(self, Node.T, Node.F) |
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
__all__ = [ 'EventBasedLoader', 'EventBasedSafeLoader' ] | |
from yaml.composer import Composer | |
from yaml.constructor import Constructor, SafeConstructor | |
from yaml.resolver import Resolver | |
import yaml | |
# Replacement for Scanner+Parser that replays events from a stream. These | |
# four methods seem to be the entire interface that Composer expects. | |
class EventBasedParser(object): |
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 <stdio.h> | |
#include <string.h> | |
#include <stdbool.h> | |
#define N 100000 | |
char buf1[1024], buf2[1024], buf3[1024], buf4[65536]; | |
static __attribute__((noinline)) bool memeqzero1(const void *data, size_t length) | |
{ |
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
/* Copyright (C) 2012-2017 by László Nagy | |
Copyright (C) 2017 Paolo Bonzini | |
This file is based on Bear. | |
It is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. |
Patchew is designed around three components:
-
a web server, which hosts the Patchew user interface and also exposes API endpoints for use from the other parts;
-
one or more importers, which read email from an IMAP server, send them to the server, and pushes the messages to a git tree;
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
[/] | |
new-window-inherit-state=true | |
use-overlay-scrollbar=true | |
terminal-title-style='small' | |
theme-variant='light' | |
session-name='${title}' | |
use-tabs=true | |
new-instance-mode='new-session' | |
enable-wide-handle=false | |
app-title='${terminalNumber}: ${sessionName}' |
OlderNewer