- Download docker-compose.yml to dir named
sentry
- Change
SENTRY_SECRET_KEY
to random 32 char string - Run
docker-compose up -d
- Run
docker-compose exec sentry sentry upgrade
to setup database and create admin user - (Optional) Run
docker-compose exec sentry pip install sentry-slack
if you want slack plugin, it can be done later - Run
docker-compose restart sentry
- Sentry is now running on public port
9000
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
documents = [ dict( | |
email=open("conference/%d.txt" % n).read().strip(), | |
category='conference') for n in range(1,372) ] | |
documents.extend([ dict( | |
email=open("job/%d.txt" % n).read().strip(), | |
category='job') for n in range(1,275)]) | |
documents.extend([ dict( | |
email=open("spam/%d.txt" % n).read().strip(), | |
category='spam') for n in range(1,799) ]) |
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 requests | |
data = { | |
'pagina': '0', | |
'tipo_consulta': '0', | |
'nr_inscricao': '123123', | |
'cbxadv': '1', | |
'id_tipoinscricao': '1', | |
'nome_advogado': '', |
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/sh | |
# ------------------------------------------------------------------------------------# | |
# Console log check | |
# ------------------------------------------------------------------------------------# | |
# Redirect output to stderr. | |
exec 1>&2 | |
# Enable user input | |
exec < /dev/tty | |
# Updated regexp to only look at the addition of console.log's on the current branch HEAD |
michelw Michel Wilhelm
I hereby claim:
- I am imakecodes on github.
- I am michelw (https://keybase.io/michelw) on keybase.
- I have a public key ASBx1LNf0SAQPCyH3HyOQkwQxe5VIlJ6p-VfJy-2JPjqXAo
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
# test_calc_stats.py | |
import calc_stats | |
user_data = [ | |
{ 'id': 1, 'name': 'Aly', 'email': '[email protected]'}, | |
] | |
activity_data = [ | |
{ 'id': 65, 'description': 'morning jog', 'distance': 3.1 }, |
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
from threading import Thread | |
class QueryFuture(Thread): | |
def __init__(self, q): | |
self.q = q | |
super().__init__() | |
def run(self): | |
self.docs = presto.execute_response(self.q) |
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 pendulum | |
import requests | |
import os | |
timestamp = pendulum.now().format("YYYY-MM-DD-HH-mm") | |
filename = f"{timestamp}.json" | |
filepath = f"/home/mwilhelm/notebook/will/data/{filename}" | |
latest = f"/home/mwilhelm/notebook/will/data/latest.json" | |
base_url = "https://balneabilidade.ima.sc.gov.br/relatorio/mapa" | |
for i in range(5): |
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
from django.db import models | |
class Person(models.Model): | |
name = models.CharField(max_length=200) | |
groups = models.ManyToManyField('Group', through='GroupMember', related_name='people') | |
class Meta: | |
ordering = ['name'] | |
def __unicode__(self): |
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
from bisect import bisect | |
from random import random | |
def weighted_choice(choices): | |
if not choices: | |
return None | |
values, weights = zip(*choices) | |
total = 0 |
OlderNewer