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
| python3 << 'EOF' | |
| import ast | |
| import sys | |
| file_path = "~/test_clinical_study.py" | |
| with open(file_path, 'r') as f: | |
| tree = ast.parse(f.read(), filename=file_path) | |
| imported = set() |
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
| import textwrap | |
| def format_string(data, chunk_size=73, indent=4, return_output=False): | |
| """ | |
| Format a string into chunks of specified size using textwrap, with optional indentation. | |
| Args: | |
| data: Input string to be formatted. | |
| chunk_size: Size of each chunk (default: 73). | |
| indent: Number of spaces for indentation (default: 4). |
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
| import msgpack | |
| class Event: | |
| @staticmethod | |
| def pack(payload): | |
| return msgpack.packb(payload, use_bin_type=True) | |
| @staticmethod | |
| def unpack(blob): | |
| return msgpack.unpackb(blob, raw=False, strict_map_key=False) |
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
| https://discord.com/api/download/stable?platform=linux&format=deb |
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
| > docker save \ | |
| python:3.12.11-slim-bookworm \ | |
| zeromq:latest \ | |
| fanout/pushpin:1.40.1 \ | |
| redis:8.2.1-alpine3.22 \ | |
| mariadb:12.1.1-rc \ | |
| -o all_images.tar |
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
| - Connect the RUTX12 to main router and connect other devices to the RUTX12 | |
| - Use the assigned hostname while connected to the RUTX12 | |
| - Test the RTMP and advertising | |
| - Begin to pack every essentials | |
| - Check the kitchen to be sure we didn't leave anything behind | |
| - # on bitia | |
| Settings: | |
| - ensure one can turn on and off recording from the dashboard |
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
| > rsync -avP .ssh [email protected]:~ | |
| # the above copies the .ssh folder from PC A and dumps the folder to the ~/.ssh on the PC B |
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
| mkdir -p ~/.npm-global | |
| npm config set prefix '~/.npm-global' | |
| echo 'export PATH=$HOME/.npm-global/bin:$PATH' >> ~/.bashrc | |
| source ~/.bashrc |
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
| import time | |
| from datetime import datetime, timedelta, timezone | |
| import redis | |
| class RedisTimeTracker: | |
| def __init__(self): | |
| self.RD = redis.Redis( | |
| host="127.0.0.1", |
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
| #!/bin/bash | |
| TARGET=/usr/local/bin/docker-compose | |
| # Step 1: Create the file | |
| sudo touch "$TARGET" | |
| # Step 2: Make it executable | |
| sudo chmod +x "$TARGET" |
NewerOlder