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 <avr/io.h> | |
#include <avr/interrupt.h> | |
#include <util/delay.h> | |
void display_internal(uint8_t mask, uint8_t c) | |
{ | |
uint8_t bm = mask == 0x0F ? 0b00000000 : 0b00001000; | |
uint8_t sh = mask == 0x0F ? 0 : 4; | |
if ((c & mask) >> sh == 0x00) { |
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 <avr/io.h> | |
void sleep(const int milliseconds) { | |
for (int j = 0; j < milliseconds; j++) { | |
for (int i = 0; i < (8000 / 18 - 28); i++); | |
} | |
} | |
int main() | |
{ |
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 <avr/io.h> | |
#include <avr/interrupt.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#define C2 | |
#define DDR_SPI DDRB | |
#define PORT_SPI PORTB | |
#define DD_MOSI DDB2 |
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 <avr/io.h> | |
void USART_Init( unsigned int ubrr){ | |
/* Set baud rate */ | |
UBRR1H = (unsigned char)(ubrr>>8); | |
UBRR1L = (unsigned char)ubrr; | |
/* Enable receiver and transmitter */ | |
UCSR1B = (1<<RXEN1)|(1<<TXEN1); | |
/* Set frame format: 8data, 2stop bit */ | |
UCSR1C = (1<<USBS1)|(1<<UCSZ11)|(1<<UCSZ10); |
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 | |
# | |
# Ausführen um Raspbian (oder ein anderes Debian) zu einem Anzeiger für IServ | |
# zu konfigurieren. | |
# Superuser Rechte holen. | |
if [ $(id -u) -ne 0 ]; then | |
echo Superuser Rechte nötig. | |
exit 1 | |
fi |
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 <[email protected]> | |
# | |
# 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/python | |
import chess | |
import chess.uci | |
import sys | |
import time | |
MOVETIME = 120.0 |
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) |