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 | |
# run the following script to get all the needed html files for processing : | |
# for i in AL AM AT AZ BY BE DK EE MK FI FR GE DE GR HU IS IE IL IT LV LT MT MD \ | |
# ME NO PL PT RO RU SM SI ES SE CH NL UA GB; | |
# do wget -O "$i.html" "http://www.eurovision.tv/page/results?event=1893&voter=$i"; | |
# done | |
# and put them in the working directory of this script. | |
use strict; |
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
static int sadd(int a, int b) | |
{ | |
asm ( | |
"addl %1, %0\n\t" | |
"jo 1f\n\t" | |
"jmp 4f\n\t" | |
"1: js 2f\n\t" | |
"jmp 3f\n\t" | |
"2: movl $0x7fffffff, %0\n\t" | |
"jmp 4f\n\t" |
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 | |
use warnings; | |
use strict; | |
use Audio::TagLib; | |
use File::Find; | |
use Statistics::Histogram; | |
die "Usage : $0 <dir>" unless $ARGV[0] && -d $ARGV[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/perl | |
use warnings; | |
use strict; | |
use File::Find; | |
use Digest::file qw(digest_file_hex); | |
use Cwd; | |
my %sums; |
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 <iostream> | |
#include <vector> | |
#include <algorithm> | |
#include <stdexcept> | |
#include <random> | |
#include <chrono> | |
static void usage(const char *progname) | |
{ | |
std::cerr << "Bogosort : A program implementing the bogosort algorithm.\n"; |
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
bits 64 | |
global bubblesort | |
; void bubblesort(int *data [rdi], size_t size [rsi]) | |
bubblesort: | |
sub rsi, 1 ; make sure we don't overrun (element+1 is accessed inside the loop) | |
.loop1: | |
xor ecx, ecx ; index for .loop2 | |
xor eax, eax ; are we done yet? | |
.loop2: |
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
bits 64 | |
global factorial | |
; uint64_t factorial(uint n [edi],bool *valid [rsi]) | |
factorial: | |
mov [rsi], dword 1 ; assume no overflow until proven otherwise | |
cmp edi, 1 | |
jbe .ret1 | |
cmp edi, 21 | |
jae .overflow ; result will not fit in a uint64 |
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
bits 16 | |
cpu 8086 | |
org 0x7c00 | |
init: | |
xor ax, ax | |
mov ss, ax | |
mov sp, 0x7c00 | |
mov ds, ax |
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/awk -f | |
/TITLE/ { | |
FS=": "; | |
$0=$0; | |
Title=$2; | |
} | |
/Duration/ { | |
FS=" "; | |
$0=$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
*.com | |
*.lst |
OlderNewer