Skip to content

Instantly share code, notes, and snippets.

View Darkflib's full-sized avatar
🏠
The real problem is not whether machines think, but whether men do.

Mike Preston Darkflib

🏠
The real problem is not whether machines think, but whether men do.
View GitHub Profile

Conversation with gpt-4.1

Extracted on 2025-04-15 02:09:53

System

Use Python code where applicable. Follow best practice - exceptions, inline documentation etc. If there are multiple options, please outline them before commiting to them.

{
"article_content_markdown": "# Faster-Than-Light Communication in Science Fiction: A Universe of Possibilities (and Paradoxes)\n\nFaster-than-light (FTL) communication is a staple of science fiction, enabling instant contact across vast interstellar distances. Without it, galactic empires would crumble, and thrilling space operas would be reduced to generations-long voyages with delayed messages. However, the concept raises fascinating questions about physics, causality, and the very nature of reality.\n\n## The Need for Speed (of Information)\n\nIn most sci-fi universes, interstellar travel is impractical, if not impossible, without FTL. FTL communication becomes essential for:\n\n* **Command and Control:** Empires spread across multiple star systems need immediate coordination of military, economic, and political activities.\n* **Exploration and Discovery:** Explorers on distant worlds need to transmit data back to their home bases, report findings, and request assistance.\n* **Trade and Diploma
@Darkflib
Darkflib / ai.json
Created April 8, 2025 18:29
structured output
{
"article_content_markdown": "# The Rise of AI: Transforming Modern Technology\n\nArtificial Intelligence (AI) has rapidly evolved from a futuristic concept to an integral part of modern technology, influencing various sectors and reshaping the way we live and work. Its ability to analyze vast amounts of data, identify patterns, and make intelligent decisions has unlocked unprecedented opportunities for innovation and efficiency.\n\n## AI's Impact Across Industries\n\n* **Healthcare:** AI algorithms are revolutionizing diagnostics, drug discovery, and personalized medicine. AI-powered tools can analyze medical images with greater accuracy, predict patient outcomes, and assist surgeons with complex procedures.\n* **Finance:** AI is transforming the finance industry through fraud detection, algorithmic trading, and risk management. AI-driven chatbots provide customer support and personalized financial advice.\n* **Manufacturing:** AI-powered robots and automation systems are increasing productivity, im

Supporting an Autistic Partner: A One-Page Primer

Understanding Sensory Sensitivities Autistic people often experience the world more intensely. Sensory overload is common and can cause distress or shutdown.

Signs to look out for:

Irritability in loud or chaotic environments.

Discomfort in heat, bright lights, or tight clothing.

What Shall We Do with the Sleepy Geek?

(To the tune of "Drunken Sailor")

(Chorus)

What shall we do with the sleepy geek?

What shall we do with the sleepy geek?

@Darkflib
Darkflib / LICENCE.txt
Last active December 10, 2024 21:23 — forked from superboum/LICENCE.txt
Install Debian with Debootstrap + Grub EFI
MIT LICENSE
Copyright 2018 Quentin Dufour
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH

Here's a quick reference for Tmux, covering sessions, panes, and windows along with the command you mentioned.

Tmux Basics

  • Start a new session:
    tmux new -s <session_name>
  • Attach to an existing session:

tmux attach -t

import random
import os
def load_words():
# Get a random word from the system dictionary.
# Check if the file exists and is readable.
if not os.access('/usr/share/dict/words', os.R_OK):
return []
# Check if the file is not empty.
import pysmartthings
import asyncio
import logging
import os
import dotenv
import aiohttp
dotenv.load_dotenv()
# Enable default logging
@Darkflib
Darkflib / RAG.md
Last active November 6, 2024 13:25

Embeddings and dimensionality reduction in the context of RAG (Retrieval Augmented Generation).

Vector embeddings typically have many dimensions (e.g., 768, 1024, or 1536 dimensions depending on the model), but you're correct that they can often be compressed while maintaining much of their utility. Here's why and how this works:

  1. Primary Principles:
  • Embeddings encode semantic meaning across their dimensions
  • The dimensions aren't necessarily ordered by importance in their raw form
  • However, we can transform them to be ordered by importance
  1. Dimensionality Reduction Methods: