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
cat basebackup.py | |
import io, os | |
import psycopg2 | |
import tarfile | |
from contextlib import closing | |
from datetime import date | |
from time import time | |
def add_file(archive, filename, data): | |
with closing(io.BytesIO(data.encode())) as f: |
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 python3 | |
import random | |
import argparse | |
import gi | |
import logging | |
gi.require_version("GLib", "2.0") | |
gi.require_version("Gst", "1.0") | |
elements = "agingtv,videoflip,vertigotv,gaussianblur,shagadelictv,edgetv,identity,exclusion,navigationtest".split( |
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
def push_context(fn): | |
@wraps(fn) | |
def decorator(*args, **kwargs): | |
app_host = app.config.get('SERVER_NAME') | |
app_root = app.config.get('APPLICATION_ROOT') | |
base_url = 'https://{}/'.format(app_host if app_host else 'localhost') | |
if app_root: | |
base_url += app.root.lstrip('/') | |
app.test_request_context(base_url=base_url).push() | |
return fn(*args, **kwargs) |
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
use embassy_nrf::gpio::{AnyPin, Flex, OutputDrive, Pull}; | |
use embedded_hal::digital::OutputPin; | |
use embassy_futures::select::{select, Either}; | |
use embedded_hal_async::{delay::DelayUs, digital::Wait}; | |
use lora_phy::mod_params::RadioError; | |
use lora_phy::mod_traits::InterfaceVariant; | |
pub struct LoRaInterfaceVariant<'d, WAIT> { |
OlderNewer