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
const groupGoalMachine = Machine({ | |
id: 'groupGoal', | |
initial: 'listing', | |
context: { | |
goal:null | |
}, | |
states: { | |
listing: { | |
entry: ['emptyGoal'], |
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
My Awesome Sketch | |
First State | |
tick -> Second sat | |
Second sat | |
tick -> First State |
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
const registrationMachine = Machine( | |
{ | |
id: `registration`, | |
initial: `codeEntry`, | |
context: { | |
user: undefined, | |
}, | |
states: { | |
codeEntry: { | |
on: { SUBMIT: `submitting` }, |
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 { InMemoryCache } from 'apollo-cache-inmemory'; | |
import { ApolloClient } from 'apollo-client'; | |
import { ApolloLink } from 'apollo-link'; | |
import { onError } from 'apollo-link-error'; | |
import { createUploadLink } from 'apollo-upload-client'; | |
import React from 'react'; | |
import { ApolloProvider } from 'react-apollo'; | |
import ReactDOM from 'react-dom'; |
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
*PPD-Adobe: "4.3" | |
*%%%% PPD file for ZPL Label Printer with CUPS. | |
*%%%% Created by the CUPS PPD Compiler CUPS v2.1.3. | |
*% Copyright 2007-2014 by Apple Inc. | |
*% Copyright 1997-2007 by Easy Software Products. | |
*% | |
*% These coded instructions, statements, and computer programs are the | |
*% property of Apple Inc. and are protected by Federal copyright | |
*% law. Distribution and use rights are outlined in the file "LICENSE.txt" | |
*% which should have been included with this file. If this file is |
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
# Ask for the user password | |
# Script only works if sudo caches the password for a few minutes | |
sudo true | |
# Install kernel extra's to enable docker aufs support | |
# sudo apt-get -y install linux-image-extra-$(uname -r) | |
# Add Docker PPA and install latest version | |
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 | |
# sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list" |
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 Annotation(models.Model): | |
datapoint = models.ForeignKey('datapoint.Datapoint', related_name='%(class)s_parent_datapoint_relation') | |
owner = models.ForeignKey('users.User', related_name='%(class)s_creator_relation') | |
tags = models.ManyToManyField('tags.Tag', related_name="%(class)s_tags_relation", blank=True) | |
# Key fields from the Annotator JSON Format: http://docs.annotatorjs.org/en/latest/annotation-format.html | |
annotator_schema_version = models.CharField(max_length=8, blank=True) | |
text = models.TextField(blank=True) | |
quote = models.TextField() |
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.forms import widgets | |
from datapoint.models import Datapoint, Annotation | |
from rest_framework import serializers | |
from rest_framework.exceptions import ParseError | |
from tags.serializers import TagSerializer | |
from tags.models import Tag | |
from users.serializers import UserSerializer | |
import simplejson as json | |
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 PIL import Image, ExifTags | |
photo = Image.open(args['filename']) | |
photo_exif = None | |
try: | |
# See if this image has any exif | |
photo_exif = Image.open(args['filename'])._getexif() | |
except: | |
pass | |
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
pip install ipython sphinx pyzmq pygments tornado nose django-extensions | |
easy_install readline pyzmq | |
# Now can run with django | |
# ./manage.py shell_plus --notebook |
NewerOlder