Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.
You've got two main options:
| # Recommended Celery Django settings for reliability: | |
| # (use `app.config_from_object('django.conf:settings', namespace='CELERY')` | |
| # in proj/celery.py module) | |
| from decouple import config # use python-decouple: https://github.com/HBNetwork/python-decouple | |
| # Prefer RabbitMQ over Redis for Broker, | |
| # mainly because RabbitMQ doesn't need visibility timeout. See: | |
| # https://blog.daftcode.pl/working-with-asynchronous-celery-tasks-lessons-learned-32bb7495586b | |
| # https://engineering.instawork.com/celery-eta-tasks-demystified-424b836e4e94 |
| import time | |
| from collections import deque | |
| import numpy as np | |
| import sounddevice as sd | |
| from beepy import beep | |
| from infi.systray import SysTrayIcon | |
| last_alert = time.time() - 10 | |
| q = deque(maxlen=200) |
| # From https://stackoverflow.com/a/68876046/1319998, which is itself inspired by https://stackoverflow.com/a/68814418/1319998 | |
| from contextlib import contextmanager | |
| from collections import namedtuple | |
| from ctypes import cdll, byref, string_at, c_char_p, c_int, c_double, c_int64, c_void_p | |
| from ctypes.util import find_library | |
| from sys import platform | |
| def query(db_file, sql, params=()): |
| --- | |
| version: "2" | |
| services: | |
| emby: | |
| image: linuxserver/emby | |
| container_name: emby | |
| environment: | |
| - PUID=998 | |
| - PGID=100 | |
| - TZ=America/Denver |
| """ | |
| Django ORM Optimization Tips | |
| Caveats: | |
| * Only use optimizations that obfuscate the code if you need to. | |
| * Not all of these tips are hard and fast rules. | |
| * Use your judgement to determine what improvements are appropriate for your code. | |
| """ | |
| # --------------------------------------------------------------------------- |
Check your current file/directory permission with:
stat -c "%a" /path/to/dir_or_fileTo recursively give directories read&execute privileges:
find /path/to/base/dir -type d -exec chmod 755 {} +