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 python | |
| # | |
| # Mixpanel, Inc. -- http://mixpanel.com/ | |
| # | |
| # Python API client library to consume mixpanel.com analytics data. | |
| # | |
| # Copyright 2010-2013 Mixpanel, Inc | |
| # Copyright 2016 Edadeal, LCC | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
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
| #!/bin/sh | |
| git grep -h import | sed -e 's/ *from \([^ ]\+\) import.*/\1/g' -e 's/ *import \([^ ]\+\).*$/\1/' | sort -u |
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
| machine: | |
| services: | |
| - docker | |
| environment: | |
| DOCKER_REGISTRY: example.com | |
| DOCKER_REPO: myproject | |
| DOCKER_USER: circleci | |
| DOCKER_EMAIL: [email protected] | |
| dependencies: |
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
| from collections import defaultdict | |
| from itertools import cycle | |
| import re | |
| import dateutil | |
| from matplotlib import cm | |
| from random import random | |
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
| { | |
| "beaker": "2", | |
| "cells": [ | |
| { | |
| "evaluator": "Python3", | |
| "evaluatorReader": true, | |
| "id": "codebd1MLI", | |
| "input": { | |
| "body": [ | |
| "from elasticsearch_dsl import Search", |
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 python | |
| # | |
| # Mixpanel, Inc. -- http://mixpanel.com/ | |
| # | |
| # Python API client library to consume mixpanel.com analytics data. | |
| # | |
| # Copyright 2010-2013 Mixpanel, Inc | |
| # Copyright 2015, Andrew Grigorev <[email protected]> | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
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
| { | |
| "template": "mixpanel-*", | |
| "settings": {"index.refresh_interval": "1m"}, | |
| "mappings": { | |
| "_default_": { | |
| "_all": {"enabled": false}, | |
| "date_detection": false, | |
| "dynamic_templates": [ | |
| {"string_fields": { | |
| "match": "*", |
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 subprocess | |
| from datetime import datetime | |
| from time import sleep, time | |
| import locale | |
| import psutil | |
| locale.setlocale(locale.LC_ALL, locale.getdefaultlocale()) |
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 re | |
| apache_combined = re.compile( | |
| '(?P<clientip>[\d\.]+) (?P<ident>\S+) (?P<auth>\S+) ' | |
| '\[(?P<timestamp>.*?)\] ' | |
| '"(?P<verb>\S+) (.*) HTTP/(?P<httpversion>\d\.\d)" ' | |
| '(?P<response>\d+|-) (?P<bytes>\d+|-)' | |
| '( "(?P<referrer>.*?)")?' | |
| '( "(?P<agent>.*)")?' | |
| ) |
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
| input { stdin { type => "access" } } | |
| filter { | |
| grok { | |
| match => { "message" => "%{COMBINEDAPACHELOG}" } | |
| remove_field => [ "message" ] | |
| } | |
| date { | |
| match => [ "timestamp", "dd/MMM/yyyy:HH:mm:ss Z" ] | |
| remove_field => [ "timestamp" ] |