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/python2 | |
import random | |
import math | |
# Model | |
# ===== | |
class TicTacToeGrid(object): | |
def __init__(self): |
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 <gmp.h> | |
#include <stdlib.h> | |
int main(int argc, char *argv[]) { | |
if (argc <= 1) { | |
printf("Give number of iterations as arguments!\n"); | |
} | |
mpq_t husband, wife, value, delta; |
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/perl | |
# | |
# Copyright (c) 2014 Niklas Fiekas <niklas.fiekas@tu-clausthal.de> | |
# | |
# 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 the following conditions: |
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/python3 | |
# Fuzz testing for UCI engines using python-chess. | |
import chess | |
import chess.uci | |
import random | |
import logging | |
import sys | |
random.seed(123456) |
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
<?php | |
error_reporting(E_ALL); | |
define('DB_HOSTNAME', 'localhost'); | |
define('DB_USERNAME', '***'); | |
define('DB_PASSWORD', '***'); | |
define('DB_DATABASE', '***'); | |
define('DB_PCONNECT', TRUE); |
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
var net = require('net'); | |
var nextGame = null; | |
function Game() { | |
var self = this; | |
this.clients = new Array(); | |
var board = new Array("1", "2", "3", |
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/python | |
import logging | |
import git | |
import sys | |
import os | |
def main(): | |
""" | |
Update all files according to a diff. |
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 math | |
n = 20 | |
#x_k = [-1 + 2 * k / float(n) for k in range(0, n + 1)] | |
x_k = [math.cos((2.0 * k + 1) / (2.0 * n +2.0) * math.pi) | |
for k in range(0, n + 1)] | |
def l_j(j, 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import unittest | |
def multiply(A, B): | |
if len(A) == 1: | |
return [[ A[0][0] * B[0][0] ]] | |
elif len(A) % 2 == 1: | |
return shrink(multiply(expand(A), expand(B))) |
OlderNewer