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
WITH | |
flights AS ( | |
SELECT | |
DATE(event_at) AS dt, | |
COUNT(*) | |
FROM | |
`reporting.flight_allocations` | |
WHERE | |
event_at > "2020-04-25" | |
GROUP BY |
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/bash -x | |
ARGS=$(ls /etc/spark/conf | grep -v "[a-z]") | |
for i in ${ARGS} | |
do | |
envvar=$(cat "/etc/spark/conf/${i^^}" | tr "-" "_") | |
if [ "${envvar}" != "" ] | |
then | |
export ${i^^}="${envvar}" | |
fi |
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 testing | |
import ( | |
"context" | |
"database/sql" | |
"log" | |
"os" | |
"sync" | |
txdb "github.com/DATA-DOG/go-txdb" |
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 main | |
import ( | |
"fmt" | |
"strings" | |
"time" | |
) | |
func main() { | |
nextWeekStart := time.Now() |
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 cmds | |
import ( | |
"context" | |
"encoding/json" | |
"errors" | |
"fmt" | |
"strings" | |
d "github.com/opensimsim/utilities/database" |
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
# Path to your oh-my-zsh installation. | |
export ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load. | |
ZSH_THEME="andyblessington" | |
# ZSH_THEME="avit" | |
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) | |
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ | |
# Example format: plugins=(rails git textmate ruby lighthouse) |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Ansi 0 Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.15696373581886292</real> |
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
// Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -. | |
// Example: | |
// Given a = 1 and b = 2, return 3. | |
package main | |
func getSum(a int, b int) int { | |
} |
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 cmds | |
import ( | |
"context" | |
"strings" | |
"time" | |
"github.com/jinzhu/gorm" | |
"github.com/opensimsim/api-v3/errors" |
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 main | |
import ( | |
"strings" | |
"testing" | |
) | |
func BenchmarkFib10(b *testing.B) { | |
// run the Fib function b.N times | |
var c = "abcdefghijklmnopqrstuvwxyz" |
NewerOlder