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
| // https://go.dev/play/p/pCVgS47-yNt | |
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| ) | |
| type dict map[string]any |
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
| import code, os, sys | |
| prompt = '> ' | |
| def read_fork(): | |
| global prompt | |
| while True: | |
| s = input(prompt) | |
| s = s.strip() | |
| if s == 'fork' or s == 'whatif': |
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 main | |
| import ( | |
| "fmt" | |
| "testing" | |
| ) | |
| func product(xss [][]int) [][]int { | |
| if len(xss) == 0 { | |
| return nil |
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 main | |
| import ( | |
| "flag" | |
| "fmt" | |
| "io" | |
| "math/rand" | |
| "os" | |
| "regexp" | |
| "sort" |
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
| /** | |
| * Naive goroutines lookalike in Scala. | |
| * | |
| */ | |
| import scala.concurrent._ | |
| import scala.concurrent.duration.Duration | |
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 zsh | |
| # This script prints a bell character when a command finishes | |
| # if it has been running for longer than $zbell_duration seconds. | |
| # If there are programs that you know run long that you don't | |
| # want to bell after, then add them to $zbell_ignore. | |
| # | |
| # This script uses only zsh builtins so its fast, there's no needless | |
| # forking, and its only dependency is zsh and its standard modules | |
| # |
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 python3 | |
| import sys | |
| f = sys.stdin | |
| if len(sys.argv) == 4: | |
| f = open(sys.argv[3]) | |
| a = int(sys.argv[1]) | |
| b = int(sys.argv[2]) |
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
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| labels: | |
| app: madlogger | |
| name: madlogger | |
| namespace: kube-system | |
| spec: | |
| replicas: 30 | |
| selector: |
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 main | |
| import ( | |
| "flag" | |
| "fmt" | |
| "io/ioutil" | |
| "sort" | |
| "strings" | |
| ) |
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 main | |
| import ( | |
| "fmt" | |
| "sync" | |
| "time" | |
| ) | |
| func main() { | |
| newPort := func() func() int { |
NewerOlder