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
# Use a different solved board to generate different tests. | |
valid = [[5,3,4,6,7,8,9,1,2], | |
[6,7,2,1,9,5,3,4,8], | |
[1,9,8,3,4,2,5,6,7], | |
[8,5,9,7,6,1,4,2,3], | |
[4,2,6,8,5,3,7,9,1], | |
[7,1,3,9,2,4,8,5,6], | |
[9,6,1,5,3,7,2,8,4], | |
[2,8,7,4,1,9,6,3,5], | |
[3,4,5,2,8,6,1,7,9]] |
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
# The subgrid of grid starting at x,y | |
def sub_grid(grid,x,y): | |
res = [] | |
rows = grid[y:y+3] | |
for i in range(len(rows)): | |
res += rows[i][x:x+3] | |
return res | |
# i'th column of grid |
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
;; Fuzzer configuration | |
;; A good seed for crashing during code generation: 1343186061 | |
(define seed (current-time)) ; current-time is Guile-specific (RNG seed) | |
(define max-items 10000) ; Maximum number of list elements in the output program | |
(define max-int (expt 2 30)) ; Largest int to appear in any math expression | |
(define branch-factor 100) ; Most arguments to a math expression | |
;; Random number generator - Numerical Recipes LCG | |
(define (rand-int mod) | |
(let ((a 1664525) |
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
Make a wobsite (in Perl) | |
Binary trees in Agda (Cherie's Garden) | |
- Naive | |
- AVL | |
- Treaps | |
- Red-Black | |
- Splay | |
- 1-2 Brother | |
Compression (and depression) algorithms in C/Rust: | |
- GIF (LZW) |
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
package example | |
import macros.Annotate | |
import InheritExample._ | |
object AnnotateExample extends AnnotateExampleTrait | |
trait AnnotateExampleTrait { | |
@Annotate() | |
val integer: Int = 9 |