Moved to https://github.com/amstan/pipeqoa/blob/master/quality_test/main.c
This file contains hidden or 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
amstan@ltfs1110:/home/contest/ai-contest/planet_wars/submissions$ ls -altr|wc | |
32001 256002 2111994 | |
amstan@ltfs1110:/home/contest/ai-contest/planet_wars/submissions$ mkdir amstan-test-folder | |
mkdir: cannot create directory `amstan-test-folder': Too many links |
This file contains hidden or 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 python3 | |
def bitlist(x): | |
return [float(d) for d in bin(x)[2:][::-1]] | |
def amstan(x,k=0): | |
"""Computes amstan's function. k=0 returns just a bitcount of x, k=1 returns just x, anything in between is magic!""" | |
bits=bitlist(x) | |
return sum(bit*(2.**(i*k)) for i,bit in enumerate(bits)) |
This file contains hidden or 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/bash | |
export KDEV_DBUS_ID=$(qdbus|grep kdevplatform) | |
absfile=$1 | |
qdbus $KDEV_DBUS_ID /org/kdevelop/DocumentController org.kdevelop.DocumentController.openDocumentSimple $absfile | |
echo "Waiting for kdevelop to close all tabs with $absfile." | |
while true ; do | |
kdevelop_absfiles=$(qdbus $KDEV_DBUS_ID /org/kdevelop/DocumentController org.kdevelop.DocumentController.activeDocumentPaths) |