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
#!/usr/bin/env bash | |
set -o pipefail | |
set -e | |
set -x | |
function _get_userid_from_mounts() { | |
type -fp awk >/dev/null || return 1 | |
local mountpath | |
local folder_uid | |
while read -r mountpath ; do |
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 functools | |
import logging | |
import os | |
import struct | |
from typing import Dict, cast, Optional, List | |
import cytoolz | |
from trio.hazmat import wait_readable | |
import inotify_simple | |
import trio |
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 logging | |
import sys | |
import trio, trio_asyncio, asyncio | |
from hypercorn.trio.run import worker_serve | |
from hypercorn import Config | |
import contextlib | |
import math | |
from types import TracebackType | |
from quart import current_app, 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 contextlib import asynccontextmanager | |
import trio | |
class broadcaster: | |
def __init__(self): | |
super().__init__() | |
self.subscribers = {} | |
async def __aenter__(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 functools | |
import logging | |
import os | |
import struct | |
from typing import Dict, cast, Optional, List | |
import cytoolz | |
from trio.hazmat import wait_readable | |
import inotify_simple | |
import trio |
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 cStringIO | |
import logging | |
log = logging.getLogger('log') | |
class te_lengthfound_exception(StandardError): | |
def __init__(self, length, extension): | |
self.length=length | |
self.extension=extension | |
class te_trailer_exception(StandardError): |
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 functools, cStringIO, sys | |
import itertools, zlib, gzip, os | |
class savedata: | |
# convenience class used only while reading the gzip file header. | |
# it may not be a gzip file, so this instance will hold whatever was read so we don't have to seek backwards | |
def __init__(self, fileobj): | |
self.fileobj = fileobj | |
self.saved_data = cStringIO.StringIO() |
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
{ | |
"account": { | |
"customerInfo": null, | |
"giftCardBalance": null, | |
"giftCardRedeemCode": "", | |
"giftCardRedeemError": "", | |
"isGiftCardRedeemed": false, | |
"isGiftCardRedeemLoading": false, | |
"isLoading": false | |
}, |
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
{ | |
"account": { | |
"customerInfo": null, | |
"giftCardBalance": null, | |
"giftCardRedeemCode": "", | |
"giftCardRedeemError": "", | |
"isGiftCardRedeemed": false, | |
"isGiftCardRedeemLoading": false, | |
"isLoading": false | |
}, |
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
{ | |
"account": { | |
"customerInfo": null, | |
"giftCardBalance": null, | |
"giftCardRedeemCode": "", | |
"giftCardRedeemError": "", | |
"isGiftCardRedeemed": false, | |
"isGiftCardRedeemLoading": false, | |
"isLoading": false | |
}, |
NewerOlder