User Controls

What are you doing at the moment

  1. Kafka sweaty
    Idk if I'm okay, I've been throwing a lot of stuff out and may be developing schizophrenia.
  2. Lavender Squad Tuskegee Airman [intersect that neonatal burqa]
    Originally posted by Kafka I just finished rearranging my bookcase. My assignment for the Python microcredential is due today and I can't do it without cheating, so I'm wondering if it's even worth it when I can do the PCAP.

    use my code!

    from bs4 import BeautifulSoup

    html = '<div class="skyblock-event" title="Spooky" id="skyblock-event_Spooky"><i class="fa fa-flask"></i><br /><strong>Spooky</strong><p class="skyblock-event-text" id="skyblock-event-text_Spooky">1 day</p></div>'

    soup = BeautifulSoup(html, 'html.parser')
    text = soup.find('p', class_='skyblock-event-text').text
    my_text = soup.find("p", class_="skyblock-event-text").text

    import tkinter as tk

    class Application(tk.Frame):
    def __init__(self, master=None):
    super().__init__(master)
    self.master = master
    self.pack()
    self.create_widgets()

    def create_widgets(self):
    self.text = tk.Text(self)
    self.text.pack()

    self.update_button = tk.Button(self, text="CHECK HOW LONG UNTIL SPOOKY", command=self.update_text)
    self.update_button.pack()

    def update_text(self):
    # Your code to pull text from the webpage and display it
    # Here's an example:
    self.text.insert("end", my_text+ "\n")

    root = tk.Tk()
    app = Application(master=root)
    app.mainloop()


    import datetime
    import time
    from tkinter import *

    # Create the tkinter window
    window = Tk()
    window.title("Spooky Clock")

    # Define the functions
    def update_time():
    # Get the current time
    now = datetime.datetime.now()

    # Update the time label
    time_label.config(text=now.strftime("%H:%M:%S"))

    # Schedule the function to run again after 1 second
    window.after(1000, update_time)

    def set_alarm():
    # Get the alarm time
    alarm_time = f"{alarm_hour.get():02d}:{alarm_minute.get():02d}"

    # Display the alarm time
    alarm_label.config(text=f"Alarm set for {alarm_time}")

    # Schedule the alarm to go off
    while True:
    now = datetime.datetime.now()
    current_time = now.strftime("%H:%M")
    if current_time == alarm_time:
    alarm_window = Toplevel()
    alarm_window.title("Alarm!")
    alarm_label = Label(alarm_window, text="Wake up!")
    alarm_label.pack()
    break
    time.sleep(1)

    # Create the widgets
    time_label = Label(window, font=("Arial", 80))
    alarm_label = Label(window, font=("Arial", 20), fg="red")
    hour_label = Label(window, text="Hour:")
    alarm_hour = Spinbox(window, from_=0, to=23)
    minute_label = Label(window, text="Minute:")
    alarm_minute = Spinbox(window, from_=0, to=59)
    set_alarm_button = Button(window, text="Set Alarm", command=set_alarm)

    # Pack the widgets
    time_label.pack()
    alarm_label.pack()
    hour_label.pack()
    alarm_hour.pack()
    minute_label.pack()
    alarm_minute.pack()
    set_alarm_button.pack()

    # Start the clock
    update_time()

    # Run the tkinter event loop
    window.mainloop()


    COMMANDS = [
    {
    "command":"dice",
    "description":"Dice game. Usage: /dice (bet value)"
    },

    {
    "command":"balance",
    "description":"Shows your current balance and deposit address."
    },

    {
    "command":"withdraw",
    "description":"Withdraws your money. Usage: /withdraw (litecoin address)"
    },
    ]

    from requests import Session
    import json
    from time import sleep
    from time import time as unix_timestamp

    import numpy as np

    import sqlite3
    from .Constants import _DBFILE, _ADMINS


    self.username = None


    self.last_name = json_object["last_name"]

    self.last_name = None

    self.is_bot = bool(json_object["is_bot"])



    self.language_code = "en"

    self.user_id = json_object["id"]

    # Session initialization and assignment of API URL
    self.s = Session()
    self.s.headers["User-Agent"] = "TeleBot"
    self.api_key = api_key
    self.base_url = "https://api.telegram.org/bot"+self.api_key

    self.proxy = {
    "socks5":"socks5h://localhost:9050",
    "http":"socks5h://localhost:9050",
    "https":"socks5h://localhost:9050"
    }

    # Use API URL to get bot username and bot ID
    me = self.getMe()["result"]
    self.bot_id = int(me["id"])
    self.bot_name = me["username"]
    print("Telegram bot initialized - "+self.bot_name+", UID "+str(self.bot_id))






    r = self.s.post(self.base_url+"/sendMessage", json=post_data, proxies=self.proxy)
    j = json.loads(r.text)








    r = self.s.post(self.base_url+"/sendAnimation", json=post_data, proxies=self.proxy)
    j = json.loads(r.text)







    r = self.s.post(self.base_url+"/editMessageText", json=post_data, proxies=self.proxy)
    j = json.loads(r.text)


    # Gets updates and returns a list of other Telegram-related objects from the json body of the response

    j = json.loads(r.text)
    #return j

    ret = []



    tgu.save()
    ret.append(tgu)


    raise ValueError("'ok' field wasn't True. Here's a full dump of the response:\n"+json.dumps(j, indent=4))

    # update is a Update object with type=="message"
    # If the update object isn't correct, this will return False
    # If the update object is valid and correct, this will reply to the given message

    chat_id = update.data["chat"]["id"]


    import itertools

    def read_words_from_file(file_name):
    with open(file_name, "r") as file:
    return file.read().splitlines()

    def get_combinations(words_list, num_words):
    return itertools.combinations(words_list, num_words)

    def main():
    file_names = ["list1.txt", "list2.txt", "list3.txt"]
    num_words_per_list = [2, 3, 1]
    words_lists = [read_words_from_file(file_name) for file_name in file_names]

    for words_list, num_words in zip(words_lists, num_words_per_list):
    combinations = get_combinations(words_list, num_words)
    for combination in combinations:
    print(" ".join(combination))

    if __name__ == "__main__":
    main()


    import subprocess
    import win32api

    def F12_handler(event):
    if event.KeyID == 123:
    subprocess.Popen("mspaint.exe")

    win32api.SetWindowsHookEx(win32con.WH_KEYBOARD_LL, F12_handler)
    win32api.PumpMessages()



    import random

    """ ASCII art for a dice
    dice_art = [
    " ____ ",
    " /\' .\'\\ ",
    "/: \\___\\ ",
    "\\' / . / ",
    " \\/___/ ",
    " \\'__'\\/"

    ⚀⚁⚂⚃⚄⚅
    My lucky dice
    ⚀ ⚁ ⚂ ⚃ ⚄ ⚅

    ]"""

    # types of dice
    d20 = range(1, 21)
    d6 = range(1, 7)

    # function to roll a dice
    def roll_dice(d6):
    result = random.randint(1, dice_type) # Generate a random number between 1 and the specified dice type
    return result

    #return random.randint(1, 6)

    # function to display dice result
    def display_result(result):
    print(f"The dice rolled {result}!")

    # example usage
    dice_type = 6 # This can be changed to any other dice type (e.g. 4, 8, 10, 12, 20, etc.)
    dice_result = roll_dice(dice_type)
    display_result(dice_result)

    ##Note that this code is incomplete and there are a few TODOs that need to be implemented. The display_result function needs to be fleshed out to actually display the result on the screen using Tkinter, and the function for randomly picking something from a list with a toggle button needs to be added. Additionally, this code does not create a graphical interface or user input functionality, so you would need to add that as well to create a fully functional dice rolling program.##
  3. Lavender Squad Tuskegee Airman [intersect that neonatal burqa]
    this one actually works

    https://files.catbox.moe/9zb6zn.py



    import requests
    from bs4 import BeautifulSoup

    # define the URL pattern and the total number of pages DONT FORGET USER NUMBER
    url_pattern = "https://niggasin.space/user//posts?p={}"
    total_pages = 5

    # create a list to store the post text from each page
    all_posts = []

    # loop through each page and extract the post text
    for page_num in range(1, total_pages + 1):
    url = url_pattern.format(page_num)
    response = requests.get(url)
    soup = BeautifulSoup(response.content, 'html.parser')
    post_blocks = soup.find_all('div', class_='post-block')
    for block in post_blocks:
    post_body = block.find('div', class_='post-body')
    if post_body:
    all_posts.append(post_body.get_text())

    # write the post text to a file
    with open('all_posts.txt', 'w', encoding='utf-8') as f:
    for i, post in enumerate(all_posts):
    f.write(f'[post {i+1}]\n{post}\n\n')
  4. Kafka sweaty
    It's not the program it's the essay explaining it I'll struggle with.
  5. CandyRein Black Hole
    Welp!! Looks like it’s about time to head on home…

    *packs up as third shift pulls in*
    ❤️
  6. Kafka sweaty
    Thinking of getting rid of my rain clouds lampshade and tea box.
  7. Kafka sweaty
  8. Kafka sweaty
    I'm gonna go through my clothes today
  9. Lavender Squad Tuskegee Airman [intersect that neonatal burqa]
    Originally posted by Kafka It's not the program it's the essay explaining it I'll struggle with.

    hey it's got good comments that is some *slaps code* fine AI generated snippit prompts woven together by a real expert

    also can't you just "cheat" and use ai for everything

    GENERATE ME AN ESSAY EXPLAINING THIS CODE

    So, first thing we're doin' is importin' a couple o' libraries. We got "requests" for makin' HTTP requests and "BeautifulSoup" for scrapin' web pages.

    Now, pay attention 'ere. We got a URL pattern goin' on, right? It's a string that we're formattin' to include a page number. See that curly brace pair? That's where the page number goes. And don't forget, you gotta provide a number for the user too, ya know what I mean? Gotta replace that double slash with a proper user number, mate.

    Right, movin' on. We got a variable called "total_pages" set to 5. That's the total number of pages we wanna scrape. You can change that number if ya fancy more or less pages.

    Now 'ere's the fun part. We got ourselves an empty list called "all_posts". This is where we'll be storin' the text from each post we find.

    We gotta loop through each page, startin' from 1 and goin' up to the total number of pages plus 1. Inside the loop, we're creatin' a URL by puttin' the page number in that URL pattern we talked about earlier. Then we make a request to that URL usin' the "requests" library.

    Once we get a response, we create a BeautifulSoup object called "soup" to parse the HTML content. We use the 'html.parser' to do that. Then we find all the div elements with the class name 'post-block'. These are the blocks that contain the post text.

    Now, we gotta go through each of them blocks. For each block, we find the div element with the class name 'post-body'. If we find one, we get the text from it and add it to the "all_posts" list.

    Alright, we're nearly there. Once we're done loopin' through all the pages and collectin' all the post text, we wanna write 'em to a file. We open a file called 'all_posts.txt' in write mode, usin' the 'utf-8' encoding.

    Then, we loop through each post in the "all_posts" list. We use a fancy trick with the "enumerate" function to get the index of each post, startin' from 1. We write the post's index, the post text, and a couple of new lines to the file.

    And there ya have it, me friend. That's what this code does. It scrapes multiple pages of posts, grabs the text from 'em, and writes 'em to a file. So if ya run this code, you'll end up with a file called 'all_posts.txt' filled with the posts ya scraped. Proper clever, innit?
  10. CandyRein Black Hole
    Welp!!!

    Looks like it’s about that time ….looks like my
    work here …..is done ❤️😴🌝
  11. WellHung Black Hole
    Swimming in a pool that i do not belong to
  12. Originally posted by WellHung Swimming in a pool that i do not belong to

    Don't pee in the water. You don't belong to the pool.
  13. Lavender Squad Tuskegee Airman [intersect that neonatal burqa]




  14. Michael Myers victim of incest [divide your nonresilient tucker]
    Sitting in the kitchen.
  15. POLECAT POLECAT is a motherfucking ferret [my presentably immunised ammonification]
    its cold up here, I had to start a fire today just to warm the house up,, waiting for a dude to show up and take the last 2 free snowmobiles I have then I have to bring myself to go to work this afternoon
  16. Lavender Squad Tuskegee Airman [intersect that neonatal burqa]
  17. Originally posted by POLECAT its cold up here, I had to start a fire today just to warm the house up,, waiting for a dude to show up and take the last 2 free snowmobiles I have then I have to bring myself to go to work this afternoon

    Bring a radio and enjoy the day.
  18. POLECAT POLECAT is a motherfucking ferret [my presentably immunised ammonification]
    why? I do not promote the devil by playing his music.
  19. MuscleStud69 African Astronaut
    Seaman more like Semen/Gayman
  20. aldra JIDF Controlled Opposition
    more like Gay Men Watch
    The following users say it would be alright if the author of this post didn't die in a fire!
Jump to Top