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
| # views.py | |
| from django.http import JsonResponse | |
| from django.views.decorators.csrf import csrf_exempt | |
| from django.views.decorators.http import require_POST | |
| import json | |
| from .models import Measurement | |
| from .tasks import process_measurement_batch | |
| @csrf_exempt |
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
| // udp-ingress.js | |
| // Node.js UDP ingress with batching for high-throughput IoT measurements | |
| const dgram = require('dgram'); | |
| const http = require('http'); | |
| const cluster = require('cluster'); | |
| const os = require('os'); | |
| // Configuration | |
| const CONFIG = { |
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
| { | |
| "$schema": "http://json-schema.org/draft-07/schema#", | |
| "type": "object", | |
| "title": "Donation Completed Event", | |
| "description": "Schema for donation.completed webhook events", | |
| "required": ["id", "event", "created", "environment", "data"], | |
| "properties": { | |
| "id": { | |
| "type": "integer", | |
| "description": "Unique event identifier" |
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
| { | |
| "$schema": "http://json-schema.org/draft-07/schema#", | |
| "type": "object", | |
| "title": "Donation Completed Event", | |
| "description": "Schema for donation.completed webhook events", | |
| "required": ["id", "event", "created", "environment", "data"], | |
| "properties": { | |
| "id": { | |
| "type": "integer", | |
| "description": "Unique event identifier" |
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 django import forms | |
| from django.core.validators import RegexValidator | |
| from django.utils.translation import gettext_lazy as _ | |
| class ContactForm(forms.Form): | |
| street_and_number = forms.CharField( | |
| max_length=200, | |
| label=_('Street and house number') | |
| ) | |
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
| (() => { | |
| let file = null | |
| let iframe = null | |
| let version = 'v2' | |
| window.initPersonalAdmin = () => { | |
| file = window.serverJSON.files.find(f => f.vUrl == `zip/pitcher_personal_admin_${version}.zip`) | |
| if (file) { | |
| iframe = document.createElement('iframe') |
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
| {"lastUpload":"2020-11-13T09:58:04.931Z","extensionVersion":"v3.4.3"} |
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 bash | |
| FILE=875483 | |
| SLIDES=(1 2 3 4) | |
| WORKING_DIR=/tmp/875483_1592496241 | |
| if [[ ! -d $WORKING_DIR ]]; then | |
| mkdir /tmp/875483_1592496241 | |
| fi |
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
| var urlPieces = window.location.href.split('/'); | |
| var slideFolder = urlPieces[urlPieces.length - 2]; | |
| function gotoPage(p) { | |
| for (var i = 0; i < slideOrder.length; i++) { | |
| var pieces = slideOrder[i].split('|'); | |
| if (pieces[0] == slideFolder && pieces[1] == "" + p) { | |
| Ti.App.fireEvent('gotoVSlide', {p: i}); | |
| } | |
| } |
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
| # -*- coding: utf-8 -*- | |
| import json | |
| import six | |
| from django.conf import settings | |
| from django.core.files import File | |
| from django.http import QueryDict | |
| from django.utils import six | |
| from djangorestframework_camel_case.settings import api_settings | |
| from djangorestframework_camel_case.util import _get_iterable, camel_to_underscore, is_iterable |
NewerOlder