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
# -*- coding: utf-8 -*- | |
""" | |
Created on Fri Aug 14 14:55:33 2015 | |
@author: bruno | |
""" | |
import numpy as np | |
from pylab import * |
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
# -*- coding: utf-8 -*- | |
""" | |
Created on Mon Apr 28 19:41:13 2014 | |
@author: Bruno | |
""" | |
from flask import Flask | |
import serial | |
app = Flask(__name__) |
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
# -*- coding: utf-8 -*- | |
""" | |
Created on Mon Dec 7 17:00:09 2015 | |
@author: bruno | |
""" | |
""" | |
Bar chart demo with pairs of bars grouped for easy comparison. | |
""" |
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 | |
from django.contrib.auth.models import User | |
from registration.signals import user_registered | |
# Create your models here. | |
class UserProfile(models.Model): | |
user = models.ForeignKey(User, unique=True) | |
anything = models.CharField(max_length=2, default='A') | |
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
{ | |
/* | |
If 'outline' (default), anaconda will outline error lines. | |
If 'fill', anaconda will fill the lines. | |
If 'solid_underline', anaconda will draw a solid underline below regions. | |
If 'stippled_underline', anaconda will draw a stippled underline below regions. | |
If 'squiggly_underline', anaconda will draw a squiggly underline below regions. | |
If 'none', anaconda will not draw anything on error lines. | |
*/ | |
"anaconda_linter_mark_style": "none", |
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
version: '2' | |
services: | |
nginx-proxy: | |
image: jwilder/nginx-proxy | |
ports: | |
- "80:80" | |
volumes: | |
- /var/run/docker.sock:/tmp/docker.sock:ro |
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
class Person(models.Model): | |
first_name = models.CharField(max_length=50) | |
last_name = models.CharField(max_length=50) | |
def __str__(self): | |
return '%s %s' % (self.first_name, self.last_name |
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
server { | |
listen 80; | |
charset utf-8; | |
client_max_body_size 100m; | |
location = /favicon.ico { access_log off; log_not_found off; } | |
location /static/ { |
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
class Command: | |
pass | |
class CommandHandler: | |
pass | |
class Action(ABC): | |
def __init__(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
import json | |
class EventStore: | |
base_location = 'events' | |
storage_format = 'jsonl' | |
@classmethod | |
def _get_event_storage_path(cls, key): |