View server-example.go
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 ( | |
"github.com/sirupsen/logrus" | |
"net/http" | |
) | |
func serveHTTP(wr http.ResponseWriter, req *http.Request) { | |
http.Error(wr, "Client Error: Headers", http.StatusOK) | |
} |
View submit-metrics-example.go
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 ( | |
"context" | |
"encoding/json" | |
"time" | |
"github.com/DataDog/datadog-api-client-go/v2/api/datadog" | |
"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2" | |
"github.com/sirupsen/logrus" |
View godgen.py
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
import random | |
domains = [] | |
while True: | |
domains.append(random.randint(1,4)) | |
if random.randint(1,2) == 1: | |
break | |
dom_table = { | |
1: ["Play", "Fertility/Harvest/Babies", "Health/Disease", "Hunt", "Hearth", "Doors/Household Safety", "Baking", "Wine/Beer", "Sewing/Weaving", "Wealth", "Household Item", "Food (particular)", "Important Commodity", "Male Virility", "Bridges/Gates/Crossing/Crossroads", "Fidelity/Adultery", "Animal Husbandry", "Gossip/Reputation", "Books/Scrolls", "Important Domestic Animal/Insect"], |
View gist:446e5a35d4768536a1fd
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
# scala install | |
wget www.scala-lang.org/files/archive/scala-2.11.1.deb | |
sudo dpkg -i scala-2.11.1.deb | |
# sbt installation | |
wget wget http://scalasbt.artifactoryonline.com/scalasbt/sbt-native-packages/org/scala-sbt/sbt/0.13.1/sbt.deb | |
sudo dpkg -i sbt.deb |
View pingpong.py
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
def fizzbuzz(): | |
x= raw_input("Max number for FizzBuzz/PingPong:") | |
fizz_ping_flag=1 | |
fizz = ["fizz","ping"] | |
buzz = ["buzz","pong"] | |
fizzbuzz = ["fizzbuzz", "ping-pong"] | |
for i in range(1,int(x)): | |
if i%3 and i%5: | |
print i | |
elif not(i%3) and i%5: |