#voice-chat-text-0

1 messages · Page 396 of 1

cloud fulcrum
#

including this one

still tide
#

@whole bear bhai muje hindi aati hai

cloud fulcrum
#

but this is the only Cython dependency

low narwhal
#

Hey guys can you pls give me some more fun pip for python

still tide
#

@whole bear ok no problem

still tide
cloud fulcrum
#

@low narwhal ? you gonna have to explain that oen to me, pip is a package manager, what does fun have to do with it

#

Is that some other peice fo software?

still tide
cloud fulcrum
#

Tried, that but haven't found much on it there yet

#

maybe I am searching incorrectly though

still tide
#

hmm

low narwhal
still tide
#

@low narwhal nice lib might use in my remainder app

#

@cloud fulcrum i found someone in this server who can help you with Cython

twin glacier
#

Hi can anyone help me with a python project , I have to make a sierpinski circle

still tide
#

@twin glacier what is the issue

twin glacier
#

Even ChatGPT is unable to do it

still tide
#

use deekseek with deep thinking

twin glacier
#

Tried

cloud fulcrum
#

figured it ot

#

used something called setuptools

#

it works now

#

Thank you all for your support

#

and thank you @still tide for you going out of your way to find someone to help me

still tide
#

@cloud fulcrum ok bro

#

no problem

twin glacier
#

i need to make this using import turtle

cloud fulcrum
#

hmm

#

thats just for loops of the base shape right?

twin glacier
#

must use recurrsive

cloud fulcrum
#

im not saying its easy, but this shouldn't be too difficult unless I am missing something

#

ok still not too hard

#

then again

still tide
cloud fulcrum
#

I am writting code now for my MSC disertation

#

so maybe I being unfair in my judgement

twin glacier
#

my output is completely different

still tide
#

hehe

#

can you show me the references you are using for design

twin glacier
#

basically its project, we are given task to make replica of that

#

current output is

still tide
#

its look similar

twin glacier
#

yea its wrong tho

cloud fulcrum
#

Your loop is missing rotation.

For a stronger hint
||Try to see if you can find some kind of pattern in the rotation||

#

for the color, get a color picker

twin glacier
#

ngl i suck at this

cloud fulcrum
#

dw we all did when we started

#

are you familiar with the "divide and conquer" problem solving strategy?

twin glacier
#

nope

#

ngl i am like beginner level

cloud fulcrum
#

thats ok

#

Divide and conquer basically means: "Divide your problem into smaller, easie problems"

still tide
#

divide and conquer means with divide the problem in small problem try to solve it

cloud fulcrum
#

"Conquer those problems one at a time"

#

So comparing your work to what it needs to be

#

What are the differences?

twin glacier
#

i wish it was that easy

cloud fulcrum
#

Write them all down

#

and then see if you can see patterns

#

that could solve those differences

twin glacier
#

thank u will try

still tide
#

i am also stupid when it comes to dsa algo 😆

spice loom
#

YAAYAYAY

#

ahhah

solar sentinel
#

yoo

#
import cv2
import numpy as np
import pyautogui
import time

def screenshot(region=None):
    """Macht einen Screenshot des Spiels."""
    screenshot = pyautogui.screenshot(region=region)
    return cv2.cvtColor(np.array(screenshot), cv2.COLOR_RGB2BGR)

def find_objects(template_paths, threshold=0.8):
    """Findet Objekte basierend auf mehreren Vorlagen."""
    screen = screenshot()
    screen_gray = cv2.cvtColor(screen, cv2.COLOR_BGR2GRAY)

    for template_path in template_paths:
        # Lade und verarbeite die Vorlage
        template = cv2.imread(template_path, cv2.IMREAD_UNCHANGED)
        template_gray = cv2.cvtColor(template, cv2.COLOR_BGR2GRAY)
        w, h = template_gray.shape[::-1]

        # Template Matching
        result = cv2.matchTemplate(screen_gray, template_gray, cv2.TM_CCOEFF_NORMED)
        loc = np.where(result >= threshold)

        # Falls ein Match gefunden wird, gebe die erste Position zurück
        for pt in zip(*loc[::-1]):
            return pt[0] + w // 2, pt[1] + h // 2  # Mittelpunkt des Objekts
    return None

def move_and_click(position):
    """Bewegt die Maus und klickt."""
    if position:
        pyautogui.moveTo(position[0], position[1], duration=np.random.uniform(0.2, 0.5))
        pyautogui.click()
    else:
        print("Kein Objekt gefunden.")

# Beispiel für die Nutzung
if __name__ == "__main__":
    TEMPLATE_PATHS = ["baum.png", "baum1.png"]  # Liste der Vorlagen
    THRESHOLD = 0.4  # Genauigkeit des Matches

    time.sleep(3)  # Wartezeit, um das Spiel zu fokussieren
    print("Suche nach Objekten...")

    obj_position = find_objects(TEMPLATE_PATHS, THRESHOLD)
    if obj_position:
        print(f"Objekt gefunden bei: {obj_position}")
        move_and_click(obj_position)
    else:
        print("Kein Objekt gefunden.")
tacit crane
#

!code

wise cargoBOT
#
Formatting code on Discord

Here's how to format Python code on Discord:

```py
print('Hello world!')
```

These are backticks, not quotes. Check this out if you can't find the backtick key.

For long code samples, you can use our pastebin.

solar sentinel
#

hello

#

hello

vocal basin
#

I'm still not happy about the fact that git pull's merge message is so hard to customise

#

(I've decided to do git fetch and git merge separately)

#

yes

#

now instead of a long message with the url it just puts update {name}

#

or add {name} on the initial merge

somber heath
#

@sand hearth 👋

vocal basin
upper basin
wind raptor
vocal basin
#

5 repos, 4 tags

#

I should release a stable version of that git thing soon

#

(non-prerelease one)

frosty star
#

Yoohoo

vocal basin
#

@frosty star 👋

#

> rust
> crashes often
someone .unwrap()ped too much

#

you don't get Redis Stack, ig?

#

but that was non-open-source for quite awhile anyway

torn yarrow
#

Have you guys seen person of interest series

vocal basin
wind raptor
#

!stream 341724739590422529

wise cargoBOT
#

✅ @karmic citrus can now stream until <t:1737645062:f>.

sour willow
#

wassup af, chris, plome

#

havent seen hem in a while

whole bear
rugged root
#

Ish

#

Still getting coffee in me

chilly wolf
#

Just finished mine :)

wind raptor
#

!stream 99041425483653120

wise cargoBOT
#

✅ @chilly wolf can now stream until <t:1737646078:f>.

vocal basin
#

in some jurisdictions you're required to encrypt it even if you 100% control it

rugged root
vocal basin
#

seems like something made pagefile grow to 25GB

#

iirc I tried opening VK and it just leaked too much memory

#

like

#

70GB I think?

#

I can't hear you, VPN issues

rugged root
#

I'm being baffled

vocal basin
#

back

#

once I closed the tab it the memory usage graph was just a diagonal drop from 100% to 10%

vocal basin
#

I don't restrict its size

vocal basin
#

I've moved it off C drive

#

in Windows it's per-drive and you can disable

#

I have C: connected over USB-C

#

for reasons

#

m.2-shaped reasons

#

it's m.2 but not nvme

#

so I need an adapter

#

m.2 sata

#

nvme is pcie

#

nvm express

#

pci express

#

newer motherboards don't support m.2 sata seems like

whole bear
#

ducky_concerned that sounded funny

vocal basin
#

now wondering if it'd be easier to move the partitions to another drive or just reinstall windows

#

(also reinstall so it's proper edition not home)

#

@wind raptor
correlated failures
also known as
computer exploding

#

correlated and collateral

#

two in one

#

doesn't winrar do auto-updates only when paid?

rugged root
#

@amber raptor Were you one of the ones who actually bought WinRAR?

vocal basin
#

I heard something like that

rugged root
#

That's accurate for a few things

#

I think Revo does that

terse rose
vocal basin
#

isn't it source-available not open-source?

#

(aseprite)

#

no

#

contribution is separate

#

open-source must not have restrictions on use

#

and stuff like that

#

BSL isn't open-source

#

Redis isn't open-source

#

Mongo

#

MariaDB

#

no

#

MySQL is Oracle

#

and that one is open-source

#

but invasive

#

(GPL)

#

with corporate license being separate

vocal basin
#

I think I've seen reimplementations of MySQL protocol

#

non-forks

#

TiDB?

#

MySQL 8.0-compatible

#

licensed under Apache 2.0

#

i.e. open-source

#

DB written in Go, storage level written in Rust

#

@wind raptor you can mongo over postgres

#

FerretDB

#

MongoDB protocol, PostgreSQL backend

#

and MariaDB's extended stuff thing has Mongo protocol support too

vocal basin
#

libsql

#

@wind raptor turso?

#

that's libsql

ivory flower
vocal basin
#

it's going to be remain source available because that's more profitable than closing the source

vocal basin
# vocal basin libsql

SQLite is (the most) open-source but it's closed-contribution;
libSQL is open-source and open-contribution;

#

"the most open-source" being public domain

whole bear
#

@rugged root How you doing?

chilly wolf
whole bear
#

I hate plugins it crashes most of time!

vocal basin
#

HOW MANY???

#

pastebin tf

whole bear
#

You all use ChatGPT LOL

chilly wolf
whole bear
#

Out dated fella

#

Who use greedy GPT?

vocal basin
#

!paste

wise cargoBOT
#
Pasting large amounts of code

If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/

After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.

whole bear
#

!paste

smoky delta
whole bear
#

I don't know why but I feel threaten, when he speaks...

#

Am I racist?

urban abyss
whole bear
#

@smoky delta Bro could you talk and take pause a bit?
It feels as if you are threatening the listener.
Please take pause

whole bear
#

I barely use GPT now

#

I use deepseek

#

Its free and better

rugged root
#

Hadn't heard of that one

whole bear
#

deepseek is opensource ai

#

by china

rugged root
#

Also hello!

#

Sorry I was afk

whole bear
#

Np

smoky delta
#

I am not threatening anyone

#

I do get how it sounds tho I be trying to work on it

wind raptor
whole bear
smoky delta
whole bear
#

I like deepseek

#

What are your thoughts?

#

On it.

rugged root
#

I don't know

whole bear
#

And free for personal use

vocal basin
#

China is open Source?
I'm missing context

whole bear
#

But its free and as powerful as 4o

vocal basin
#

there's some Chinese-Russian LLM that's quite good at coding

#

idr the name

whole bear
#

I wanna know about it!

#

I hate how OpenAI become Closed LOL

ivory flower
whole bear
#

So I would support opensource irrespective of country

whole bear
#

It could be but atleast opensource, unlike GPT which is closed.
We have no Idea what they are doing and they are money hungry!

vocal basin
#

quality depends on who contributes not whether it's open-soyrce @rugged root

whole bear
vocal basin
#

@smoky delta recursive interpolation

whole bear
#

yes

#

I do

#

Ban Nokia!!
Its threat to social security!

vocal basin
#

and Nokia owns Bell Labs

peak depot
vocal basin
#

or at least owned recently

rugged root
vocal basin
whole bear
#

@molten pewter What do you expect from company which used to mock the smartphone?

peak depot
vocal basin
#

how many weeks to render

#

in Russia separate supermarket chains owned by same people is the norm

hardy sinew
#

erm

rugged root
#

Yo

dry jasper
#

creating a old wolfenstein/doom game is also still on my to do list

rugged root
#

The source is out there to use

#

It's open source now

whole bear
#

5+ kids is normal!

#

Infact 10+ is normal

rugged root
#

In what culture?

#

Because that feels like a huge amount

whole bear
#

In my culture, my dad have 9 siblings.
And I have 2

#

@rugged root How many siblings do you have?

#

@smoky delta

#

Nokia, has absolute dumb management!

urban abyss
#

i'm one of 5 and so was my ma and her da was one of 6

#

i'm the only one with our original last name going three generations up also

rugged root
#

Huh, that's wild

whole bear
#

More siblings worse it gets!

urban abyss
#

Going to apply for a job here -> https://www.newcivilengineer.com/latest/northumbrian-water-launches-20m-ai-powered-sewer-spill-reduction-project-26-06-2024/

Northumbrian Water described its “smart-sewer” project as “revolutionary” because it would allow the company to “make changes to the flow and direction of wastewater (which contains a dilute mix of sewage, rainwater, run-off from roads and fields, and water from sinks, showers and appliances) moving it around the sewer network, and making spills less likely to happen”.

#

Diverting shite is my day job already

rugged root
#

HA

hasty orbit
#

if you're talking about cloud seeding, they use different things tbh

dry jasper
rugged root
#

Just wasn't sure which compounds it is

hasty orbit
#

ChatGPT says these are the common substances:

Silver Iodide – Most widely used due to its structural similarity to ice crystals.
Sodium Chloride (Salt) – Used to create hygroscopic particles, encouraging droplet formation.
Potassium Iodide – Occasionally used as an alternative to silver iodide.
Dry Ice (Solid Carbon Dioxide) – Used for supercooling clouds to promote ice crystal formation.
Liquid Propane – Used for forming ice crystals in cold environments.
Calcium Chloride – Sometimes used for hygroscopic seeding.

#

you can see which ones are more likely to be used more often

rugged root
#

Oooo

#

Neat

vocal basin
#

.wa short 30f to c

viscid lagoonBOT
vocal basin
#

below that, liqud propane is usable allegedly

hasty orbit
smoky delta
whole bear
#

Water in India is quite clean!
One sip will be as lethal as Arsenic.

  • Fellow Indian!
vocal basin
hasty orbit
#

yeah. just thought i'd add it for more clarity

vocal basin
#

@rugged root what about fingerprint scanner on the power button (on the side)?

rugged root
#

Wait

vocal basin
#

"try to turn the screen off" challenge

rugged root
#

That's a thing?

vocal basin
#

yes

rugged root
#

Oh you just use a different finger

vocal basin
#

if you tap with wrong one too many times it wakes up and complains

smoky delta
#

I want this

vocal basin
obsidian dragon
vocal basin
smoky delta
#
        self.error_checker_label = ctk.CTkButton( self.status_bar_frame, text="😊", fg_color="green" if not self.errors or len(self.errors) == 0 else "red", width=9, font=("Verdana", 15), command=self.error_popup_checker )

this is a line that existed in my code

#

what is wrong with mer

rugged root
#
async def deliver_cargo_to_contract(
    self,
    contract_id: str,
    ship_symbol: str,
    trade_symbol: str,
    units: int,
) -> model.DeliverCargoToContractResponse:
    data = {
        "shipSymbol": ship_symbol,
        "tradeSymbol": trade_symbol,
        "units": units,
    }
    return await self._request(
        model.DeliverCargoToContractResponse,
        "POST",
        f"/my/contracts/{contract_id}/deliver",
        data=data,
    )
frosty holly
#

can someone tell what do we usually use for making a nav-bar in python using Tinker GUI

smoky delta
#
color = "green"
if "errors" not in self.__dict__ or len(self.errors) == 0:
    color = "red

self.error_checker_label = ctk.CTkButton(self.status_bar_frame, 
                                         text=":blush:", 
                                         fg_color=color,
                                         width=9, 
                                         font=("Verdana", 15), 
                                         command=self.error_popup_checker)
#

@rugged root

frosty holly
smoky delta
#

ill help

#

two secs

frosty holly
#

ok

#

the menu_bar was created ina seperate file

smoky delta
#

give me a min

#

im writing it for you

frosty holly
#

may i send the code u debug it ???

#

or see where is the problem?

rugged root
#

Yeah it'd be easier if we can see what you already have

smoky delta
#

!paste

#

youll be missing stuff

#

but call menu_bar(master)

frosty holly
#

i will provide the menu bar file
and the Home file

smoky delta
#

i stripped that from my current work

frosty holly
#

can i provide mine ???

smoky delta
#

yeah

rugged root
frosty holly
#

provide the link to paste

#

the code

smoky delta
#

!paste

wise cargoBOT
#
Pasting large amounts of code

If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/

After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.

rugged root
#

You just use the link in the embed there

molten pewter
frosty holly
smoky delta
#

def left()

molten pewter
#

"You are all fucks I hate you" -> Dear Team,

I wanted to take a moment to express my frustration with the recent challenges we have faced. Despite our best efforts, we have encountered some significant obstacles that have negatively impacted our work. I acknowledge that these setbacks may have caused frustration and disruption to our workflow.

I appreciate the dedication and hard work that each of you has put into overcoming these challenges. Your perseverance and commitment to delivering quality results are valued and recognized.

If you have any suggestions or ideas on how we can improve our processes or mitigate future obstacles, I encourage you to share them with me.

Thank you for your continued hard work and collaboration.

Sincerely,
[Your Name]

smoky delta
#
    return "left"
frosty holly
#

second one for home

frosty holly
rugged root
#

Patience. I'm currently trying to write a work email. I'll look right after that

#

And you're more likely to get quicker responses by using our help system (see the #❓|how-to-get-help channel for more information on that)

frosty holly
#

ig

unique wyvern
chilly wolf
#

Did anyone have the chance to check out my shoot'em up?

#

like i mean actually play the game

smoky delta
#

self.master.bind("<Control-o>", lambda: threading.thread(target=self.open_console_window).start())

#

^top 3 programming moments

unique wyvern
urban abyss
short owl
#

did you experiment with , GODOT , lately @rugged root

#

geeee , school over internet , that cant be possible ( snark )

rugged root
#

Hard to do anything with it since I mainly only program when I'm at the office

short owl
#

Im assuming it renders faster

urban abyss
#

Seven gunfighters are hired by Mexican peasants to liberate their village from oppressive bandits.

Subscribe: https://www.youtube.com/channel/UCf5CjDJvsFvtVIhkfmKAwAA?sub_confirmation=1
Watch more MGM videos: https://www.youtube.com/playlist?list=PLwwhtOnMyjuz28RRvQATj8OdD-HBBCCYX

The Magnificent Seven (1960)
Directed By: John Sturges
Screenp...

▶ Play video
short owl
#

fractal landscapes

tacit crane
urban abyss
frosty holly
#

@smoky delta it is good to use master that self.root???

#

self.menu_bar_frame = tk.Frame(master, bg="#281c2c", height=40)

frosty holly
smoky delta
#

self.master == root

#

master = root

#

global root = root

frosty holly
#

ok

short owl
#

Isnt there watermelon mountain doo ?

#

dew

versed heath
#
let lines = lexer(code, expressions);
        
        let lines_var = match lines {
            Ok(nlines) => nlines,
            Err(e) => {
                println!("Error: {}", e);
                return;
            }
        };
        
        self.lines = lines_var
urban abyss
#

what that mountain doo gurl

frosty holly
#

@smoky delta

#

=== Main Frame Setup ===

    # Top Frame for Menu Bar
    self.top_frame = Frame(self.root, bg="white", height=50)
    self.top_frame.pack(fill=X)


    # Content Frame (For Dynamic Page Loading)
    self.content_frame = Frame(self.root, bg="white")
    self.content_frame.pack(fill=BOTH, expand=True)

    # === Initialize the Menu Bar ===
    self.menu_bar = MenuBar(self.root)  # Pass root for menu bar
    self.menu_bar.menu_frame.pack_forget()  # Hide the menu's internal frame
    self.menu_bar.menu_frame = self.top_frame  # Reassign the menu frame to the top frame
    self.menu_bar.menu_frame.pack(fill=X)
#

there is something in this code that is oreventing the menu to appear on the homepage

#

can u please see it

short owl
#

Life according to Borat

smoky delta
#

self.menu_bar.menu_frame.pack_forget() # Hide the menu's internal frame
self.menu_bar.menu_frame = self.top_frame # Reassign the menu frame to the top frame

#
        self.menu_bar = MenuBar(root)  # Pass root for menu bar
        self.menu_bar.pack(anchor="n", fill="x")
cloud fulcrum
#

!paste

wise cargoBOT
#
Pasting large amounts of code

If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/

After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.

frosty holly
smoky delta
#

no, it replaces the entire redefine lines and such

#

its line for line the same just without the two lines

short owl
#

Sith - on

frosty holly
#

instead of the 2 i have

versed heath
#

!yes

balmy slate
#

Hello Do you know Python Crash Course book that contain python programming and applications in projects do you think it's a good idea ?

smoky delta
#

oi @frosty holly

dry jasper
#

@peak depot i have played with some finish product 😄 it was a tikka t1x, ever heard about that brand?

cloud fulcrum
dry jasper
frosty holly
#

to see its layout

rugged root
#

I love all the various ones we have

versed heath
#
module = cluster_Init()
kmeans = module.cluster_initializer(reduced_feature_vector, number_of_clusts, RANDOM_SEED, None)
#

from Cluster_Initializer import Cluster_Init

urban abyss
versed heath
#

@rugged root does this scratch rule 5

rugged root
versed heath
#

ok

urban abyss
versed heath
#

that does scratch it @rugged root

#

right

rugged root
#

Broad discussion is fine

versed heath
#

ok

rugged root
#

It's the implementation is the issue

ripe viper
#

that's the most people i've seen in one call...

rugged root
#

No

#

Nooooooo no no no

#

You really don't

urban abyss
#

learn VBA

#

it's the future

rugged root
#

The only similarity between those two is that you can do functional style programming in both

#

It's more of an academic language

#

Its focus is to be purely functional; no side-effects, very particular way of defining and processing things, etc

#

It is used in industry but is not very common

urban abyss
#

peace ☮️ o

#

i'm gonna go make a heart attack enchilada

rugged root
#

Later, JSON.

#

HA

rugged root
#

I just personally don't recommend Haskell

#

But that's just a personal beef I have with it

#

You talking about AF?

#

Gotcha gotcha

uncut sky
#

Yo @rugged root

#

ws2.lib

#

What happend to him

rugged root
#

Why do you ask?

uncut sky
#

For friend lets say...

#

So what happend

rugged root
#

You're free to ask him.

uncut sky
#

But im gonna ask you

#

Hemlock...

rugged root
#

I've given my answer

uncut sky
#

ok xDDDd

#

I thoutght u were a chill good guy Hemlock...

rugged root
#

Me being chill and me discussing situations that happened are very different things

unique wyvern
#

def widen_shrubbery(Shrubbery sh not None, extra_width):
sh.width = sh.width + extra_width

rugged root
#

!stream 425552190283972608

wise cargoBOT
#

✅ @peak depot can now stream until <t:1737661218:f>.

rugged root
#
# example.pyx

cdef void _greet(char* name, char* greeting):
    print(f"{greeting.decode('utf-8')}, {name.decode('utf-8')}!")

def greet(name: str, greeting: str = "Hello"):
    _greet(name.encode('utf-8'), greeting.encode('utf-8'))
steep epoch
#

why cant i talk

#

what is this

#

im sorry

rugged root
#

That'll tell you what you need to know about the voice gate

steep epoch
#

i need 50 meesages i think

rugged root
#

Checking

steep epoch
#

it doesnt tell me how many i miss

rugged root
#

You've got one more

steep epoch
#

oh oke

#

so now?

rugged root
#

Should be able to hit the button, ye

chilly wolf
#

Hermes is now collecting training data for Ezekiel, and Ezekiel can properly read and train on that data!

dusk raven
#

The IEEE Standard for Floating-Point Arithmetic (IEEE 754) is a technical standard for floating-point arithmetic originally established in 1985 by the Institute of Electrical and Electronics Engineers (IEEE). The standard addressed many problems found in the diverse floating-point implementations that made them difficult to use reliably and por...

hasty orbit
#

pwnagotchi

main comet
#

@sweet inlet @hasty orbit

sweet inlet
#

ender 3 pro

grim flare
#

HOLLA

#

hi all

sweet inlet
grim flare
#

what is this

#

you are so angry men

#

chill out

sweet inlet
#

ahahah

grim flare
#

i need help

sweet inlet
#

on what man

grim flare
#

in socket lib

#

can you help me ?

sweet inlet
#

honestly, never heard of theat

grim flare
#

security and network in python

#

????

#

!e
print("hello world")

wise cargoBOT
grim flare
#

!e
import ipaddress

def ipv4_to_ipv6(ipv4_address):
try:

    ipv4 = ipaddress.IPv4Address(ipv4_address)

    ipv6 = ipaddress.IPv6Address(f'::ffff:{ipv4}')
    
    return ipv6
except ValueError:
    return "Invalid IPv4 address"

ipv4 = '192.168.1.1'
ipv6 = ipv4_to_ipv6(ipv4)
print(f"IPv4: {ipv4} -> IPv6: {ipv6}")

#

!e
print("python world")

wise cargoBOT
grim flare
#

!e
import turtle

screen = turtle.Screen()
screen.bgcolor("lightblue")

pen = turtle.Turtle()
pen.speed(5)

def draw_circle(color, radius, x, y):
pen.penup()
pen.goto(x, y)
pen.pendown()
pen.begin_fill()
pen.fillcolor(color)
pen.circle(radius)
pen.end_fill()

draw_circle("orange", 100, 0, -100)
draw_circle("black", 20, -40, 30)
draw_circle("black", 20, 40, 30)
pen.penup()
pen.goto(-50, 50)
pen.pendown()
pen.setheading(0)
pen.width(5)
pen.forward(100)

draw_circle("orange", 30, -70, 120)
pen.penup()
pen.goto(70, 120)
pen.pendown()
pen.setheading(135)
pen.begin_fill()
pen.fillcolor("orange")
pen.forward(50)
pen.left(90)
pen.forward(50)
pen.left(135)
pen.forward(70)
pen.end_fill()

draw_circle("brown", 30, 0, -200)

pen.penup()
pen.goto(30, -200)
pen.pendown()
pen.setheading(-30)
pen.circle(30, 180)

pen.hideturtle()

screen.mainloop()

wise cargoBOT
# grim flare !e import turtle screen = turtle.Screen() screen.bgcolor("lightblue") pen = tu...

:x: Your 3.13 free threaded eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 1, in <module>
003 |     import turtle
004 |   File "/snekbin/python/3.13t/lib/python3.13t/turtle.py", line 101, in <module>
005 |     import tkinter as TK
006 |   File "/snekbin/python/3.13t/lib/python3.13t/tkinter/__init__.py", line 38, in <module>
007 |     import _tkinter # If this fails your Python may not be configured for Tk
008 |     ^^^^^^^^^^^^^^^
009 | ImportError: libtk8.6.so: cannot open shared object file: No such file or directory
grim flare
#

!e
def riddle_game():
print("Riddle me this:")
print("I speak without a mouth and hear without ears. I have nobody, but I come alive with wind. What am I?")
answer = input("Your answer: ")

if answer.lower() == "echo":
    print("Correct! You solved the riddle!")
else:
    print("Oops! Try again!")

riddle_game()

wise cargoBOT
# grim flare !e def riddle_game(): print("Riddle me this:") print("I speak without a ...

:x: Your 3.12 eval job has completed with return code 1.

:warning: Note: input is not supported by the bot :warning:

001 | Riddle me this:
002 | I speak without a mouth and hear without ears. I have nobody, but I come alive with wind. What am I?
003 | Your answer: Traceback (most recent call last):
004 |   File "/home/main.py", line 11, in <module>
005 |     riddle_game()
006 |   File "/home/main.py", line 4, in riddle_game
007 |     answer = input("Your answer: ")
008 |              ^^^^^^^^^^^^^^^^^^^^^^
009 | EOFError: EOF when reading a line
grim flare
#

!e
num = [1 , 2 ,3 ,4]
print(num)

wise cargoBOT
vocal basin
#

!code

wise cargoBOT
#
Formatting code on Discord

Here's how to format Python code on Discord:

```py
print('Hello world!')
```

These are backticks, not quotes. Check this out if you can't find the backtick key.

For long code samples, you can use our pastebin.

vocal basin
#

just for the ease of reading...

grim flare
#

!e
num = ["name" , "note" , "idea"]
print(num.append("hi"))

wise cargoBOT
vocal basin
#

you should've at least known it doesn't include can't in the output

#

it's cannot

#

I wonder where it's defined pithink

#

debian is funny

grim flare
#

!e
num = ["name" , "note" , "idea"]
print(num.append("hi"))
num.append("i know ")
print(num)

wise cargoBOT
grim flare
vocal basin
#

@sweet inlet policy here is not to use such ableist language even if you're referring to yourself.

#

just making sure you're aware

grim flare
#

alisa

#

can you help me

vocal basin
vocal basin
grim flare
#

I want to see how much I've chatted so far .

vocal basin
#

!user 1315680349572829186

wise cargoBOT
#
barad\_babaei
User information

Created: <t:1733753039:R>
Profile: @grim flare
ID: 1315680349572829186

Member information

Joined: <t:1736198554:R>
Roles: None

Activity

Messages: 47
Activity blocks: 8

Infractions

Total: 0
Active: 0

grim flare
#

wow

#

im done

#

i think !

#

thank you

vocal basin
#

missing py after first ```

plucky mason
#

Hi people

vocal basin
#

os is somewhat discouraged

#

!d pathlib

wise cargoBOT
#

Added in version 3.4.

Source code: Lib/pathlib/

This module offers classes representing filesystem paths with semantics appropriate for different operating systems. Path classes are divided between pure paths, which provide purely computational operations without I/O, and concrete paths, which inherit from pure paths but also provide I/O operations.

Inheritance diagram showing the classes available in pathlib. The most basic class is PurePath, which has three direct subclasses: PurePosixPath, PureWindowsPath, and Path. Further to these four classes, there are two classes that use multiple inheritance: PosixPath subclasses PurePosixPath and Path, and WindowsPath subclasses PureWindowsPath and Path....

willow light
plucky mason
#

Yea, it's rusting your brain to do only right stuff

#

Tho... I have a question to ask..
Who's familiar with -5, 256 problem?

vocal basin
#

ironic given Rust will force you into doing right stuff

plucky mason
#

yp

vocal basin
#

what's "problematic" about it?

#

misusing is for equality?

willow light
#

Well f*** car is a total loss. Waiting to get off the phone with Insurance before I join vc.

plucky mason
#

It's considered "perfomance"?

#

ints'

vocal basin
#

those integers are considered frequently used, so they aren't reallocated once you instantiate more of them

#

f-eye-stel

#

German

plucky mason
#

So if It's outside of this range, everything is good then?

#

Is it gonna be like an object if outside of this range?

vocal basin
#

if it's outside that range, it might be allocated more than once, but not guaranteed

plucky mason
#

I googled it...

#

Whatever reason it is... it's called Singelton Pattern I believe

vocal basin
#

interning isn't singleton

#

you have multiple instances of int

#

Singleton Pattern is about having a single instance of a class

#

not a single instance of a value

#

... most of the time

plucky mason
#

Welll.. when it's only repeatedly used right?

vocal basin
#

None I'd consider a singleton
False and True I wouldn't consider singletons

#

@primal shadow we do have a pharma bro in here, we can suggest that to them

plucky mason
#

a = 257
b = 257
print(a == b) # True
print(a is b) # False

primal shadow
sweet inlet
primal shadow
#

Xynqro (uiczaelphanyx)

vocal basin
#

reading through code currently

normal geyser
#

Pneumonoultramicroscopicsilicovolcanoconiosis

plucky mason
#

PyTorch... why Torch, not Tensor?

primal shadow
smoky delta
#

Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch

#

How ya look rn fr fr

vocal basin
#

emoticon

#

?

plucky mason
#

Fair enough

primal shadow
#

This is a list of emoticons or textual portrayals of a writer's moods or facial expressions in the form of icons. Originally, these icons consisted of ASCII art, and later, Shift JIS art and Unicode art. In recent times, graphical icons, both static and animated, have joined the traditional text-based emoticons; these are commonly known as emoji...

plucky mason
#

There's a word actually... that contains 189,819 letters... but I believe I'll be canceled if I write it... criminally long word

willow light
#

i coulda sworn that when it is only ascii characters it was a kaomoji

vocal basin
wise cargoBOT
#

scripts/mp3_2_wav_pair.py lines 23 to 28

file_size_mb = os.path.getsize(mp3_path) / (1024 * 1024)

# Check file size constraints
if file_size_mb < 1 or file_size_mb > 50:
    print(f"Skipping {mp3_path}: file size {file_size_mb:.2f} MB is out of the allowed range (1MB - 50MB).")
    continue```
vocal basin
#

so that there's exact byte limit

#

code seems fine

primal shadow
#

⎛⎝(•ⱅ•)⎠⎞

vocal basin
#

it's not about efficiency at any point

primal shadow
#

Hmm, wonder if I do this will it... ⎛⎝(•ⱅ•)⎠⎞

vocal basin
#

also that's MiB not MB

#

"the peak nitpick for any project"

plucky mason
willow light
#

The best nitpick is still tabs vs spaces. Just pick one and move on ffs.

vocal basin
#

anyway, yeah, code seems fine, there is nothing too egregious about it

primal shadow
willow light
#

The number of times I've been stuck in a code review sesh that was derailed within three minutes because the senior devs got pissed off that someone was using four spaces instead of two.

plucky mason
wise cargoBOT
#

.editorconfig lines 4 to 5

indent_style = tab
indent_size = 3```
vocal basin
#

I don't have an Nvidia GPU

#

RX590

plucky mason
#

He's mentally connected with CPU, straightforward Reflexx

#

Nope

#

I like toxic green in my face at 2am

vocal basin
#

(phone => high brightness difference?)

plucky mason
#

Monitor = > Straight to my face

#

What if I import windy audio in your code... is it gonna be reduced, or more realistic?

willow light
#

this was the 2018 storm, I miss storms like these.

plucky mason
#

btw... who still remember Tiles?

#

Tiles...

#

with the D instead of S 🤦‍♂️at the end

willow light
plucky mason
#

Don't remember cod lobbies here please

plucky mason
#

So you admit that you have couple of weird stuff

vocal basin
#

non-tenor-uploaded gif, a rare occasion
-# not entirely appropriate either way

willow light
#

I mean I use a 3d printed ergonomic tented separated mechanical keyboard on my main desktop

vocal basin
#

... let's turn the sh_tposting a bit down ...

smoky delta
#

wild gif

#

absolutely rambunctious

plucky mason
#

Crazy

vocal basin
#

not appropriate.

smoky delta
#

look if it was against the tos it wouldnt be in the gif browser

#

but i do get it

#

its a wild gif

gentle flint
vocal basin
gentle flint
plucky mason
#

wtf

vocal basin
smoky delta
#

didnt see what that was until i sent it

#

jesus christ what are these memes

vocal basin
#

you've been effectively told "the line ends here" earlier

smoky delta
#

shit my bad

#

why bro

plucky mason
#

I condemn, in case...

smoky delta
#

i need that

plucky mason
#

my bad

smoky delta
#

ffs

somber heath
#

Gentlemen. 🙂

smoky delta
#

GOD THE FUN POLICE

plucky mason
#

I have better

smoky delta
#

thats cobra innit?

vocal basin
smoky delta
#

bro ur gonna be banned fr not good

somber heath
#

This morning, the magpies were having a bit of a territorial. A lot of singing and beak clacking and attack-speed flying.

gentle flint
plucky mason
#

I cut this stuff

vocal basin
#

have you seen the URL?

#

please remove

#

¯_(ツ)_/¯

somber heath
#

I prefer to make my own pasta, generally, for that kind.

#

Like, premade for a bake is fine.

willow light
somber heath
#

Farrow would be alright.

#

No, barley, I mean.

#

Pardon, Plome?

#

That pre-made packet stuff like what you have, I don't like.

#

Anything other than the really narrow stuff tends to be okay.

gentle flint
tidal salmon
#

I always go for bronze-cut pasta

somber heath
#

We have a cutting machine.

tidal salmon
#

I thought about getting a pasta maker, but I decided that it's too much faff for my small kitchen

somber heath
#

You can cut it manually, but it takes getting the pasta texture right and having the right technique.

#

Tried it once. Managed, but it was a bit...uneven.

tidal salmon
#

also when I cook, I need for the cleaning process to be "get everything into the dishwasher and handwash < 3 things

willow light
somber heath
#

There's a lovely channel on YouTube, Pasta Grannies.

vocal basin
#

internet's dying

gentle flint
willow light
somber heath
#

@normal geyser Are you able to hear me asking you to stop making mic noises and singing?

flat hornet
#

hello

somber heath
#

@nova stream 👋

flat hornet
#

anybody got any interesting hobbies?

normal geyser
stuck mirage
vocal basin
stuck mirage
vocal basin
#

I don't screenshot node IPs normally

#

btw

#

there's a German company that controls quite a wide range

stuck mirage
#

It shows it in Tor by default

stuck mirage
vocal basin
#

I've config-excluded those nodes

stuck mirage
vocal basin
#
  1. too centralised, blatant single point of control
  2. youtube works terribly from their exit nodes
stuck mirage
flat hornet
#

@vocal basin is there a mod named aleris?

vocal basin
#

or ensure it's on if they think it is

flat hornet
#

Alisa, the DMs are enabled in the appeal server but circuit_board is trying to appeal but the bot is not accepting his dm

vocal basin
#

if they're banned, that I'd expect to forbid DMs,
therefore an appeals server, see link above

flat hornet
#

alright ill tell him

willow light
flat hornet
#

this is what he responded with

#

nice cat btw

willow light
#

Mr Maestro demands treats

gentle flint
inland beacon
flat hornet
#

all this is flying over my head

#

feels so weird listening to people talk through discord that i dont know

vocal basin
#

Godot and Unity both are C#-compatible

#

that looked more like an issue on Discord's side

#

internet disconnection normally doesn't cause leaving as instantly

flat hornet
#

Alisa i dont mean to annoy you any more than i have but Circuit_Board asked if you could DM him so he can talk to you

vocal basin
#

@inland beacon as long as their mishandling of authentication isn't too illegal, they aren't going to bother

#

also they might not even acknowledge the issue, because acking would mean they need to pay bug bounty

inland beacon
vocal basin
#

post it in OV, so I won't even see it, because I'm not there

#

outside voices

#

I have four linked

inland beacon
vocal basin
#

one is active,
one doesn't even have a DNS record,
two are not yet implemented

#

which domain?

flat hornet
#

only a couple thousand

inland beacon
flat hornet
vocal basin
#

@inland beacon you can introduce grammar errors in comments so it looks less AI-generated

#

make creative errors then

wise cargoBOT
#

ruchei-callback/src/lib.rs line 53

/// Implemented only for [`​Sized`​] because stored.```
vocal basin
#

thoroughly incomplete subordinate clause in a sentence

flat hornet
#

@vocal basin i need to go now, but Circuit_Board wishes to speak to you about his appeal

#

goodnight

#

i hope i havent annoyed you much

vocal basin
#

almost 4 a.m.

flat hornet
#

damn

#

uh

#

i just know his Circuit_Board

#

i dont know his id

#

i can ask and see

#

alright good

#

hes online

#

well goodnight everyone

#

and goodmorning to you alisa

#

xD

vocal basin
#

I do, just not using it

vocal basin
#

(almost morning)

wind raptor
#

!stream 1247381369785421844

wise cargoBOT
#

✅ @normal geyser can now stream until <t:1737683114:f>.

round frost
#

Hello guys

#

@normal geyser are you making some type off game?

#

@wind raptor Bro do you guys have any type of roadmap for python basics?

somber heath
#

I disagree with the applicability of roadmaps.

#

!resources

wise cargoBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

somber heath
#

Programming knowledge is a bag of things, some of which is based on the understanding of prior concepts, but not all of it.

#

It's a ever growing, ever shifting puzzle made of multiple pieces. Or lego.

#

Besides, most of the actual roadmaps I've seen tend to have things arse backwards, in my view.

#

People want concrete. It's not always that straightforward.

vocal basin
#
| server  | bot     |
| ------- | ------- |
| pydis   | modmail |
| appeals | appeals |
#

when are we getting support for tables in discord

round frost
vocal basin
#

@somber heath no, per server, not profile

#

that might be the issue

round frost
#

I am confused

vocal basin
#

!resources

wise cargoBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

somber heath
vocal basin
#

ah, wait, it was already linked

somber heath
#

Python-wise.

#

Conceptually.

#

Learning is free. Certification may or may not be.

#

But if you have money to burn, sure, you can pay for learning.

round frost
#

I can't do the def functions

#

I know some basics like data type and loops

#

Yeah bro got it

#

xD

#

hahahahaha

#

Guys tell me any basic project to make

#

Alr! I am going to make one

somber heath
#

!kindling

wise cargoBOT
#
Kindling Projects

The Kindling projects page on Ned Batchelder's website contains a list of projects and ideas programmers can tackle to build their skills and knowledge.

round frost
#

Can I use chatgpt xD?

#

xD

somber heath
#

The main point is to not trust it. Don't rely on it to be good. Asking it to write code? Don't trust that it will be well-written or even functional.

#

Asking it questions? Don't trust that what it tells you is correct or that it isn't making shit up.

#

Always corroborate what it tells you from reliable sources of information.

#

Even if what it tells you makes sense.

#

It's a fancy search term generator in terms of asking it questions.

#

The deceptive thing about it is that it is, with some things, often correct, often able to write code that even works.

#

So it lulls you into a false sense of security.

#

So, use it to give you ideas, but do your actual learning from reliable sources.

#

Which ChatGPT et al are not.

round frost
#

Okay

somber heath
#

Timezones are...complicated.

wind raptor
round frost
wind raptor
somber heath
wise cargoBOT
#
Formatting code on Discord

Here's how to format Python code on Discord:

```py
print('Hello world!')
```

These are backticks, not quotes. Check this out if you can't find the backtick key.

For long code samples, you can use our pastebin.

chilly wolf
round frost
#

I just made a pretty simple calculator that can add and subtract

somber heath
#

@normal geyser

#

It's not your microphone, it's you.

round frost
#

hahahah

karmic citrus
round frost
#

She was cute before but now she's just a person

#

He is 12 ig

#

Guys I have one question

#

Dose collage degree matters for job?

chilly wolf
willow light
#
#
# run on python 3.7
#
# python code to calculate the dynamic tropoapuse from online GFS data over
# a given date range (has to be within 7 days of the current time) and make
# a 3D animation.  As the data is accessed online and the calculations are 
# poorly coded, the program can take a while to run.
#
# NB:
# 1. Can take hours to run, due to both slow data access and poor coding
# 2. Does not fail gently if there is a data access problem (this could
#    be fixed)
# 3. Not currently able to handle a longitude range that crosses 0 (this 
#    could also be fixed, fairly easily)
# 4. Very poorly coded and not commented:  may cause nausea, vomiting, hair
#    loss, and uncontrollable crying.  You have been warned!
#
# The date and lat-lon range can be set below.
#
# (poorly) coded by Mathew Barlow
# initial release: 7 Feb 2020
# updated: 9 Feb 2020
#
# This code has *not* been extensively tested and has been, in part, 
# awkwardly translated from other coding languages, so if you find
# any errors or have any suggestions or improvements, including for
# the plotting, please let me know at Mathew_Barlow@uml.edu . Thanks!
#
# Support from NSF AGS-1623912 is gratefully acknowledged
#
chilly wolf
willow light
#

some of his earlier (1970s) code:

CC
CC  Fortran 77 program to integrate the linearized barotropic
CC  vorticity equation at 500hPa for a single latitude, only 
CC  considering advection by the mean wind and ignoring all
CC  variation in y:
CC
CC    d/dt vort = -U*d/dx vort - beta*v
CC
CC  The model is global in longitude
CC
CC  Coded by Matt Barlow a million years ago -- this really, really
CC  needs to be recoded!
CC
CC  If you find any errors, please email me at Mathew_Barlow@uml.edu
CC
CC  CAUTION: Reading through this code may cause nausea, feelings
CC  of existential dread, and uncontrollable weeping
CC
C
    parameter(nx=144) ! same as reanalysis grid
        parameter(dt=60*15) ! time step (seconds)
    parameter(nt=21*24*4) ! number of time steps
    parameter(ntout=4) ! how many time steps to skip on output
    parameter(clat=45.0) ! latitude 
    parameter(re=6.378E6) ! radius of Earth (meters)
    parameter(rpi=3.1415926) ! Pi
        parameter(omega=7.292E-5) ! angular velocity of Earth
    parameter(s=4e6) ! spatial scale of initial disturbance
C
    real vortold(nx),vortnew(nx),vort(nx)
    real u,temp(nx)
    real phi(nx),ddxphi(nx),ddxvort(nx),v(nx)
C
C  set up input and output files and data
C
    open(13,file="baro_1d_output.dat",status="unknown",
     &    access="direct",recl=4*nx)
C
C  calculate grid spacing from number of grid points and latitude
C
    dx=cos(clat*rpi/180.0)*2.0*rpi*re/real(nx)
        f0=2.0*omega*sin(45.0*3.14159/180.0)
    beta=2.0*omega*cos(45.0*3.14159/180.0)/re
C
    irec=1
C
willow light
willow light
#

My dream is an EV version of this

chilly wolf
#

The training begins...

wind raptor
#

Nice

chilly wolf
#

We'll see how 200,000 records does

#

probably not much lol

wind raptor
chilly wolf
#

gfd

wind raptor
#

!stream 99041425483653120

wise cargoBOT
#

✅ @chilly wolf can now stream until <t:1737694301:f>.

somber heath
#

Pepper in the air so easily, makes all around live sneazily.

#

BBL.

wise cargoBOT
#

:incoming_envelope: :ok_hand: applied timeout to @chilly wolf until <t:1737694770:f> (10 minutes) (reason: newlines spam - sent 111 newlines).

The <@&831776746206265384> have been alerted for review.

wind raptor
#

!untimeout 99041425483653120

wise cargoBOT
#

:incoming_envelope: :ok_hand: pardoned infraction timeout for @chilly wolf.

chilly wolf
#
def count_holes(board):
    """Count the number of holes in the board."""
    holes = 0
    for col in range(GRID_WIDTH):
        for row in range(1, GRID_HEIGHT):
            if board[row][col] == 0 and board[row-1][col] != 0:
                holes += 1
    return holes

def get_max_height_and_column_heights(board):
    """Return max column height and array of each column's height."""
    col_heights = []
    for col in range(GRID_WIDTH):
        h = 0
        for row in range(GRID_HEIGHT):
            if board[row][col] != 0:
                h = GRID_HEIGHT - row
                break
        col_heights.append(h)
    return max(col_heights) if col_heights else 0, col_heights

def get_bumpiness(col_heights):
    """Sum of absolute differences between adjacent columns."""
    bumpiness = 0
    for i in range(len(col_heights)-1):
        bumpiness += abs(col_heights[i] - col_heights[i+1])
    return bumpiness```
grand dew
#

anyone know best summarization models from huggingface for like call center conversation

chilly wolf
#
def draw_grid(grid, surface):
    reverse_color_mapping = {v: k for k, v in color_mapping.items()}  # Reverse the mapping

    for i, row in enumerate(grid):
        for j, block in enumerate(row):
            if block:
                color = reverse_color_mapping.get(block, WHITE)  # Map back to color
                pygame.draw.rect(surface, color, (j * BLOCK_SIZE, i * BLOCK_SIZE, BLOCK_SIZE, BLOCK_SIZE))
                pygame.draw.rect(surface, WHITE, (j * BLOCK_SIZE, i * BLOCK_SIZE, BLOCK_SIZE, BLOCK_SIZE), 1)
#

(SH)oot'e(M) (UP)

chilly wolf
#

Error getting reward and next state: list index out of range

somber heath
#

CC's (pronounced sea-seas and short for “corn chips”) is an Australian brand of flavoured tortilla chips produced since the early 1980s, originally by The Smith's Snackfood Company, and currently by Snack Brands Australia. CC's are predominantly sold in Australia and come in assorted flavours. CC's were also sold in New Zealand until Bluebird Fo...

chilly wolf
#

UM

#

guys

#

I think I may have broken it

#

In the most hilarious way possible

somber heath
#

@remote sail 👋

quartz beacon
somber heath
#

To answer the question, sometimes.

#

...to both parts.

#

@vale forum 👋

sacred lake
#

Hi @somber heath !
I have a question.

#

😂

somber heath
#

Proceed.

sacred lake
# somber heath Proceed.

The thing is that the people on this server are sometimes very friendly. so, I have seen them using cuss words and i wanted to know if that is okay in this server?

#

😂

#

wow

#

Got it

#

That was fun and helpful

#

Sure but I am sure that 99% people join without reading them!😂

quartz beacon
somber heath
#

@gray nymph 👋

gray nymph
#

Hi, I'm trying to get permission to speak 😅

quartz beacon
#

:)

somber heath
wise cargoBOT
#
Voice verification

Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.

gray nymph
#

yeah, thanks

#

How are you doing?

gray nymph
#

🫣

gentle flint
#

hindernisbaan

vocal basin
#

am back

#

(was away, CTO called)

#

@quartz beacon mini metro does a similar thing

#

but without music, just individual sounds

#

oh, wow, mini motorways is at 96% reviews

#

higher than mini metro

#

gartic phone gives me anxiety, me no want

quartz beacon
vocal basin
#

yeah, sounds like reddit

quartz beacon
vocal basin
#

pvpve cards against humanity:
some AIs are playing as well, and they get to generate answers instead of choosing

somber heath
#

Infinite blank cards.

#

I can see how it might be fun.

#

As an option.

vocal basin
somber heath
#

"Choose cards only but make stuff up for blank cards", "choose cards and and make cards up", "make up stuff only".

#

Maybe I'm overthinking it.

vocal basin
#

@rich garnet I have some experience with Flask, but nowadays using FastAPI only

vocal basin
#

I probably won't be able to help with it right now, since currently busy doing work

#

unless it's some small issue

#

@somber heath slightly high pitched singing

#

are you using any in-memory state and/or spawning any background threads?

#

(in-memory state as in shared across requests)

rich garnet
#

gunicorn --bind 0.0.0.0:4180 --worker-class gevent --workers 5 app:app

vocal basin
#

each worker is a separate process

rich garnet
#

2vcpus, 8gb of ram

vocal basin
#

so the current issue is high CPU usage, right?
or something else?

#

as soon as you start it? or after a request?

#

do you Thread.spawn anything from inside the code?

rich garnet
#

import gevent.monkey
gevent.monkey.patch_all()

vocal basin
#

you can use Quart, which is an async version of Flask

#

just using Quart would be easier I think

#

first Flask -> Quart
and then Quart -> FastAPI
(so that individual rewrite steps are smaller)

#

either the access needs to be authorized, or just don't provide public access to the endpoints

#

if it's on a public IP, it must check authorization for all API methods

#

either through cookies or authorization header

rich garnet
#

@app.before_request
def validate_api_key():

if request.path.startswith('/api/'):  # Apply validation only to /api/ routes
    api_key = request.headers.get('Authorization')
    if not api_key:
        logger.warning(f"Missing API key in request to {request.path} from {request.remote_addr}")
        abort(401, description="Unauthorized: Missing API Key")
    elif api_key != f"Bearer {VALID_API_KEY}":
        logger.warning(f"Invalid API key in request to {request.path} from {request.remote_addr}")
        abort(401, description="Unauthorized: Invalid API Key")
    else:
        logger.info(f"Valid API key in request to {request.path} from {request.remote_addr}")
vocal basin
#

so that it requires a token to access

#

obscuring the API won't work; you need to do it in such a way that both web access and postman access are valid

#

do you have data separated per user?

#

if the data can be acquired through the web interface, it's going to be possible to get it through the API directly

#

I'm not entirely sure what the domain of what you're doing is, so can't really say how to deal with that

#

first assume there is nothing but API, and implement rate-limiting for unauthorized users within that constraint

#

I guess the simplest way would be to use the remote IP as a key

#

"one remote IP can't access your endpoint more than 10 times a day"

#

something like that

#

too many requires should return HTTP 429 with a wait-until header

#

throttling rather than blocking

#

doing too many requests shouldn't be seen by the server as "user doing something bad"

#

i.e. going over the limit isn't a violation, just something that the user needs to be notified about once they do it

#

once you do that, you can directly translate HTTP 429 into "you've reached your daily limit, would you like to sign up?" pop up

#

I need to go now

rich garnet
#

thx for these information

normal dawn
#

hey @terse rose

terse rose
#

Hru

normal dawn
#

how do you do ?

terse rose
#

Im good just about to eat breakfast 😋

#

Hbu

normal dawn
#

yummy

#

i am just chilling

terse rose
#

Nice

normal dawn
#

hey @grim flare

#

:))

#

yeah i have but as you know arch linux and the problems

#

i think

#

university ? @grim flare

terse rose
#

Arch linux gang

normal dawn
#

just kidding

terse rose
#

I main arch btw

normal dawn
#

i didn't work with flutter that much

normal dawn
normal dawn
#

chatgpt helped me alot with it

#

bishtar tozih midi, age referenca ro befresti shayad betonam komam konam

#

linkesho mifresti ?

grim flare
normal dawn
#

you wanna publish your package there ?

#

hey @upper basin

#

Ich mag Deutsch

#

nightmare

#

@copper perch hör nicht auf ihn

#

lol

#

hey @whole bear

upper basin
#

!rule 4

wise cargoBOT
#

4. Use English to the best of your ability. Be polite if someone speaks English imperfectly.