• 7 Posts
  • 7 Comments
Joined 2Y ago
cake
Cake day: Jul 08, 2023

help-circle
rss
Does anyone actually like spez?
The anti-spez crows likes to paint people who keep using Reddit as sheep. But are there people out there who actually think he's doing a good job?
fedilink

These are people who want to be mods of communities. If you don’t understand the basics of how this platform works, you probably need to spend more time as a regular user before becoming a moderator.


Thanks for the feedback – I’m really excited about starting this community, and I think I overdid it on the promotion 😬


Welcome aboard! I really hope this commumity provides the support you need. Keep writing!


Keep Writing - A place for writers to encourage and inspire one another
“It’s not ever as much about being a good writer as it is about being a persistent writer” --Neil Gaiman [email protected] is a writer's community where consistency is celebrated above all else. We understand the journey of a writer is filled with ups and downs. Whether you're a seasoned author or just starting out, we believe that persistence is the key to honing your craft. We're here to support and motivate you every step of the way. To keep the momentum going and make writing a fun and engaging experience, we have introduced a thrilling weekly competition: the **most consistent accountability team challenge!** If you're ready to embark on a writing journey filled with consistency, growth, and camaraderie, join us at [email protected].
fedilink

Do e-cigarettes actually work?
I have a friend who has been using an e-cigarette for 10+ years. He doesn't seem any less addicted to smoking as back when he was using old-fashioned cigarettes. I understand e-cigarettes are _supposed_ to help you quit... but has anyone actually had success with them? Or, is it more like trading one vice for another?
fedilink

Why would anyone want to be a moderator?
Are moderators just purely altruistic? Or do they have an ulterior motive?
fedilink


I wish my energy company had that sort of an app! I usually have to calculate everything manually using the rates included on the back of each bill I get.



Is it rude to borrow an unused power outlet without asking?
Sometimes I'm at the doctor's office, at the library, or even at the grocery store and see an unused power outlet. My phone is dying. I feel weird plugging in, but I feel even weirder asking for permission.
fedilink

Thanks, this is the answer I was looking for. I’m trying to save money because we don’t have a lot. My wife is on board with saving, but she hasn’t done the math to see where most of our money is going.

I might need to back off a bit. I like to save, but this might be a bit much.


Is it normal to calculate how much money you spent running the AC today?
In case you're wondering, the AC unit in our bedroom costs $0.16/hour. The living room costs $0.50/hour. My wife is trying to make me stop. She says it's annoying.
fedilink

This should get you started:

import requests

# Fetch post from Reddit API
def fetch_reddit_post():
    reddit_url = "https://www.reddit.com/r/{subreddit}/comments/{post_id}.json"
    subreddit = "python"  # Replace with the desired subreddit
    post_id = "abcdef"  # Replace with the desired post ID

    url = reddit_url.format(subreddit=subreddit, post_id=post_id)
    headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3"}

    response = requests.get(url, headers=headers)
    if response.status_code == 200:
        post_data = response.json()
        return post_data
    else:
        print("Failed to fetch post from Reddit API")
        return None

# Post to Lemmy API
def post_to_lemmy(post_data):
    lemmy_url = "https://lemmy.ml/api/{version}/post"
    version = "v3"  # Replace with the desired Lemmy API version

    url = lemmy_url.format(version=version)
    headers = {"Content-Type": "application/json"}

    # Extract necessary information from the Reddit post
    title = post_data[0]["data"]["children"][0]["data"]["title"]
    content = post_data[0]["data"]["children"][0]["data"]["selftext"]

    # Create payload for Lemmy API
    payload = {
        "title": title,
        "body": content,
        "community_id": "abcdef",  # Replace with the desired Lemmy community ID
        "auth": "your_auth_token"  # Replace with your Lemmy API authentication token
    }

    response = requests.post(url, json=payload, headers=headers)
    if response.status_code == 200:
        print("Post successfully created on Lemmy")
    else:
        print("Failed to post to Lemmy API")

# Fetch post from Reddit API
post_data = fetch_reddit_post()

if post_data:
    # Post to Lemmy API
    post_to_lemmy(post_data)