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 python3 | |
| """ | |
| Redis Memory Diagnosis Script | |
| Connects to a Redis instance and produces a comprehensive memory analysis: | |
| - Memory summary (used, peak, RSS, fragmentation, eviction stats) | |
| - Replication topology (master/replica, connected replicas) | |
| - Keyspace overview (key counts, TTL coverage per DB) | |
| - Key prefix distribution (what categories of keys exist and how much space they use) | |
| - TTL analysis per prefix (which prefixes lack TTLs) |
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
| """ | |
| Diagnostic script: investigate why UserProjectModel.is_archived=True | |
| for projects the user hasn't intentionally archived. | |
| Usage (production console): | |
| exec(open("scripts/check_user_sync_groups.py").read()) | |
| check_user(13650801) | |
| """ | |
| from __future__ import annotations |
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
| { | |
| "StartAt": "Create User", | |
| "States": { | |
| "Create User": { | |
| "Type": "Task", | |
| "Resource": "arn:aws:lambda:REGION:ACCOUNT_ID:function:FUNCTION_NAME", | |
| "Next": "Assign Roles" | |
| }, | |
| "Assign Roles": { | |
| "Type": "Task", |
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
| using System; | |
| using System.Threading; | |
| using System.Threading.Tasks; | |
| namespace WhenDoesAwaitActuallyWait | |
| { | |
| public class Program | |
| { | |
| public static void Main(string[] args) | |
| { |
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
| // Calculates the cost of an Azure Container Instances container | |
| // Using the default Linux container with 1 vCpu and 1.5GB vRAM | |
| [<Measure>] type gb | |
| [<Measure>] type cores | |
| [<Measure>] type sec | |
| [<Measure>] type gbPerSec = gb/sec | |
| [<Measure>] type corePerSec = cores/sec |
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
| in_progress = 0 | |
| start_end_game = 1 | |
| game_over = 2 | |
| left=0 right=1 up=2 down=3 | |
| valid_moves = {left,right,up,down} | |
| function _init() | |
| player = {} | |
| player.x = flr(rnd(120)) |