$bid = 'myblock';
$block = \Drupal\block_content\Entity\BlockContent::load($bid);
$render = \Drupal::entityTypeManager()->getViewBuilder('block_content')->view($block);
$block_manager = \Drupal::service('plugin.manager.block');
| ## Core Identity & Environment | |
| - Primary programming language: Python (experienced developer, not a beginner) | |
| - Operating System: EndeavourOS Mercury Neo (Arch Linux, KDE Plasma 6, Wayland, Linux 6.xx.x) | |
| - When suggesting commands for MY system, reference Arch Linux specifically | |
| ## Scenario 1: System Troubleshooting & Configuration | |
| **When I'm debugging issues on MY Linux system or configuring MY tools:** | |
| - Always ask for current tool configurations first, as I have many custom implementations | |
| - Provide efficient diagnostic commands based on EndeavourOS/Arch Linux, KDE Plasma 6, Wayland | |
| - Include simple one-liners to quickly identify available tools (e.g., "which tool1 tool2 tool3") |
| ## Technical Environment | |
| - Primary programming language: Python (experienced developer, not a beginner) | |
| - Operating System: EndeavourOS Mercury Neo (Arch Linux, KDE Plasma 6, Wayland, Linux 6.xx.x) | |
| - When suggesting commands, reference Arch Linux specifically and consult Arch Linux documentation when needed | |
| - Always ask for current tool configurations when debugging tools, as I have many custom implementations. Get an idea of tool configs before making suggestions or solutions. | |
| ## Communication Style | |
| - Keep explanations brief and to the point | |
| - Ask clarifying questions before giving detailed answers, especially when additional context would enrich the response | |
| - When asking clarifying questions about system-related topics, provide efficient diagnostic commands based on my known environment (EndeavourOS/Arch Linux, KDE Plasma 6, Wayland) |
| #!/bin/bash | |
| # Check if source directory is provided | |
| if [ "$#" -lt 1 ]; then | |
| echo "Usage: $0 source_directory [output_directory]" | |
| echo "Example: $0 /path/to/source" | |
| echo "If output_directory is not specified, will create '{source_directory}_flattened'" | |
| exit 1 | |
| fi |
| #!/bin/bash | |
| # Function to get primary monitor dimensions | |
| get_primary_monitor_dimensions() { | |
| xrandr --query | awk '/ primary /{print $4}' | cut -d'+' -f1 | |
| } | |
| # Function to get primary monitor position | |
| get_primary_monitor_position() { | |
| xrandr --query | awk '/ primary /{print $4}' | cut -d'+' -f2,3 |
| [ | |
| { | |
| "task": "renewable_energy_presentation", | |
| "prompt": "Create a presentation about the benefits of renewable energy. Include a pie chart showing the global energy mix and a bar plot comparing the costs of different energy sources. Use a green technology theme and make it look professional." | |
| }, | |
| { | |
| "task": "ai_healthcare_research_summary", | |
| "prompt": "Make a presentation summarizing the key findings of the research paper 'Advances in AI for Healthcare' by John Doe et al. Include the most important figures and tables from the paper. Use a clean, minimalistic theme suitable for an academic audience." | |
| }, | |
| { |
| { | |
| "Create new presentation": "Ctrl+N", | |
| "Add a new slide": "Ctrl+M", | |
| "Apply bold formatting to the selected text": "Ctrl+B", | |
| "Open the Font dialog box": "Ctrl+T", | |
| "Cut selected text, object, or slide": "Ctrl+X", | |
| "Copy selected text, object, or slide": "Ctrl+C", | |
| "Paste cut or copied text, object, or slide": "Ctrl+V", | |
| "Insert a hyperlink": "Ctrl+K", | |
| "Insert a new comment": "Ctrl+Alt+M", |
| import os | |
| from PyPDF2 import PdfReader | |
| from pdf2image import convert_from_path | |
| # directory where your PDFs are stored | |
| pdf_dir = 'pdfFiles' | |
| # iterate over each file in the directory | |
| for file in os.listdir(pdf_dir): | |
| if file.endswith('.pdf'): |
| function downloadPDFs() { | |
| // Query all iframe elements | |
| var iframes = document.querySelectorAll("iframe"); | |
| // Function to extract PDF URL | |
| function getPDFUrl(src) { | |
| // Check if it's a PDF.js URL | |
| if (src.includes('pdfjs')) { | |
| // Extract file parameter | |
| var fileParam = new URL(src).searchParams.get('file'); |
| <?php | |
| /** | |
| * Stage 1: Evaluation / Analysis of nodes using same the paragraph data tiem with different revisions. | |
| */ | |
| function analysis($print_output = false, $print_count = 20) { | |
| if ($print_output) print("\nStage 1: Analyze the messed up paragraph data: ------------------------------------------------\n"); | |
| $database = \Drupal::database(); | |
| /** |