View README.md

Using Locust.io with Grafana

On your locust master server:

  • Install and configure Graphite. Follow a good tutorial
  • Install and configure Grafana: tutorial

Use logra.py on your locust test file. See locustfile.py.

View service-checklist.md

Internet Scale Services Checklist

A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."

Basic tenets

  • Does the design expect failures to happen regularly and handle them gracefully?
  • Have we kept things as simple as possible?
View snapshots.py
import re
import boto3
import csv
from botocore.exceptions import ClientError
ec2 = boto3.client('ec2')
def get_snapshots():
return ec2.describe_snapshots(OwnerIds=['self'])['Snapshots']
View keybase.md

Keybase proof

I hereby claim:

  • I am gleicon on github.
  • I am gleicon (https://keybase.io/gleicon) on keybase.
  • I have a public key whose fingerprint is C6CC 3FB6 16AE 0EFA 74E1 D749 E45A 2482 12B7 5B5B

To claim this, I am signing this object:

View stats.py
# Helper class for statistics
# see: http://www.johndcook.com/blog/standard_deviation/
class Stats:
""" Uses Welford's method to calculate stats.
Assumes positive values.
It's not thread safe
stats = Stats("ConnectionTimeStats")
stats.add(0.223)
stats.add(1.343)
View main.go
package main
import (
"bufio"
"fmt"
"strings"
"github.com/dgryski/go-simstore/simhash"
)
View Readme.md

Relacionamento de quem fez X, também fez X

O objetivo aqui é pegar uma entrada composta por um csv com: produto, sessão. E considerando que a ação X foi aplicada a ele criar um cara que pega as relações por sessão.

Exemplo de entrada:

1231312124,cb808cb9-3bfd-4c0c-ad20-2e181b9b3a93
1231212124,cb808cb9-3bfd-4c0c-ad20-2e181b9b3a93
1231112124,cb808cb9-3bfd-4c0c-ad20-2e181b9b3a93
1231762124,cb808cb9-3bfd-4c0c-ad20-2e181b9b3a93
View histogram.rb
# This routine needs the color_histogram method
# from either ImageMagick 6.0.0 or GraphicsMagick 1.1
# Specify an image filename as an argument.
require 'RMagick'
class PixelColumn < Array
def initialize(size)
super
fill {Magick::Pixel.new}
View do_sysctl.conf
# Protection from SYN flood attack.
net.ipv4.tcp_syncookies = 1
# Martians? Don't care.
net.ipv4.conf.all.log_martians = 0
# Discourage Linux from swapping idle server processes to disk (default = 60)
vm.swappiness = 10
vm.dirty_ratio = 60
vm.dirty_background_ratio = 2