Researched by Robert Quattlebaum [email protected].
Last updated 2020-02-03.
""" | |
Sanic Compress Extension | |
Compress responses using gzip, deflate or brotli (if [brotli](https://pypi.org/project/Brotli/) or | |
[brotlicffi](https://pypi.org/project/brotlicffi/) is installed). | |
Limitations: | |
* No compression on streaming responses | |
* No compression on chunked responess |
#include <stdio.h> | |
#include <stdint.h> | |
// Philips Sonicare NFC Head Password calculation by @atc1441 Video manual: https://www.youtube.com/watch?v=EPytrn8i8sc | |
uint16_t CRC16(uint16_t crc, uint8_t *buffer, int len) // Default CRC16 Algo | |
{ | |
while(len--) | |
{ | |
crc ^= *buffer++ << 8; | |
int bits = 0; | |
do |
# Encode inputfile.tar.gz as a series of video frames | |
# Frames are written to frames/frameNNNN.png | |
from PIL import Image | |
with open('inputfile.tar.gz', 'rb') as f: | |
data = f.read() | |
WIDTH = 120 | |
HEIGHT = 90 | |
CHUNK_SIZE = int((WIDTH * HEIGHT) / 8) |
backend per_ip_and_url_rates | |
stick-table type binary len 8 size 1m expire 24h store http_req_rate(24h) | |
backend per_ip_rates | |
stick-table type ip size 1m expire 24h store gpc0,gpc0_rate(30s) |
from ask_sdk_core.dispatch_components import AbstractRequestHandler | |
from ask_sdk_core.utils import is_intent_name | |
from ask_sdk_core.handler_input import HandlerInput | |
from ask_sdk_model.response import Response | |
from ask_sdk_model.ui import StandardCard, Image, SimpleCard | |
from ask_sdk_model.interfaces.audioplayer import ( | |
PlayDirective, PlayBehavior, AudioItem, Stream, AudioItemMetadata, | |
StopDirective) | |
from ask_sdk_model.interfaces import display |
import copy | |
menu = {"4 chick-n-minis": 3.35, | |
"egg white grill": 3.79, | |
"bacon/sausage egg cheese biscuit": 2.95, | |
"buttered biscuit": 0.99, | |
"sunflower multigrain bagel": 1.95, | |
"hash browns": 1.15, | |
"greek yogurt parfait": 3.35, | |
"fruit cup": 3.09, |
I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6
apt-get update && apt-get install gdb
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.
In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit
#!/usr/bin/env bash | |
progname=$(basename $0) | |
version="1.0 (2014-08-17)" | |
step=2 | |
function create_hash { | |
openssl dgst -sha1 -binary <<< "$1" | xxd -p | |
} |