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 ruby | |
| def evaltarget(target) | |
| puts target | |
| lowest = [] | |
| both = [] | |
| 1.upto(6) do |a| | |
| 1.upto(6) do |b| | |
| unless a+b >= target | |
| l = [a,b].min |
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
| choose = require 'choose' | |
| pad = require 'pad' | |
| ZERO = 0 | |
| ONE = 1 | |
| Number::inverse = () -> | |
| ONE - this | |
| Number::toPercentage = () -> |
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
| package org.ethelred.test; | |
| import java.util.*; | |
| public class PriorityQueueTest | |
| { | |
| public static void main(String[] args) | |
| { | |
| int times = 20; | |
| if(args.length > 0) |
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
| package org.ethelred.test; | |
| import java.util.Map; | |
| import java.util.HashMap; | |
| public class EntryTest | |
| { | |
| public static void main(String[] args) | |
| { |
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 ruby | |
| $template_hits = 4 | |
| $blast_hits = 2 | |
| $large_blast_hits = 5 | |
| class Dice | |
| def self.d6 | |
| Proc.new { rand(6) + 1 } | |
| end |
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
| seq 100|perl -lpe'$r="";$_%3||($r.="Fizz");$_%5||($r.="Buzz");$_=$r||$_' |
NewerOlder