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
| #include<u.h> | |
| #include<libc.h> | |
| #define CHILD(x) ((x) * 2 + 1) | |
| enum{ | |
| Nsuits = 4, | |
| Ncards = 13, | |
| Ntot = Nsuits * Ncards, | |
| Nplayers = 4 |
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
| align2 <- function(x, y) | |
| { | |
| # FFT | |
| pad <- rep(0, length(x)) | |
| xp <- c(pad, x, pad) | |
| yp <- c(pad, y, pad) | |
| fx <- fft(xp) | |
| fy <- fft(yp) | |
| # Correlation |
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
| #!/opt/plan9/bin/rc | |
| . 9.rc | |
| path = ($PLAN9/bin/venti $path) | |
| arenasize = $1 | |
| isectsize = `{echo 'int('^$arenasize^'*0.05)' | hoc} | |
| bloomsize = 512 | |
| touch venti.conf |
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
| urldecode(){ | |
| echo -e "$(sed 's/+/ /g; s/%/\\x/g')" | |
| } |
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
| status() { | |
| echo -n $(cat /sys/devices/platform/smapi/BAT0/state) $(cat /sys/devices/platform/smapi/BAT0/remaining_percent) '|' $(uptime | sed 's/.*://; s/,//g') '|' $(date) | |
| } |
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
| local_events() { | |
| cat << '!' | |
| Keygroup Multimedia | |
| Key XF86AudioMute | |
| amixer sset Master toggle | |
| Key XF86AudioLowerVolume | |
| amixer sset Master 2- | |
| Key XF86AudioRaiseVolume | |
| amixer sset Master 2+ |
NewerOlder