#voice-chat-text-0

1 messages ยท Page 227 of 1

toxic arch
#

eh guess so

#

yeah but its not really usefull for someone to use for themselves

#

its cool

#

but i dont think someone needs a 8 bit cpu emu

somber heath
#

We do have emus a few suburbs over.

#

They're not really normally around here.

vocal basin
#

for some reason emus for me are associated (apart from Australia) with India
(but I don't fully remember what happened there)

somber heath
#

Bunch of emu and ostrich farming in India, apparently.

vocal basin
#

around 2012, quite recent

toxic arch
#

hello @idle vector

#

is there anyone streaming?

#

doing good, about to sleep how are you confused raptor?

#

k ima go sleep now

#

good night

eager thorn
#

good morning @somber heath @obsidian dragon

golden sonnet
#

is this good for an about page?

#

i forgot to say hi๐Ÿ‘‹

obsidian dragon
somber heath
#

@spice quarry ๐Ÿ‘‹

spice quarry
somber heath
#

@snow turret ๐Ÿ‘‹

#

@spice dock ๐Ÿ‘‹

somber heath
#

@ionic jungle ๐Ÿ‘‹

ionic jungle
#

Hello

somber heath
#

@obtuse falcon ๐Ÿ‘‹

obtuse falcon
#

Yo

somber heath
#

@stable anchor ๐Ÿ‘‹

stable anchor
#

hi

warped raft
#

hello @obsidian dragon and @stark river

#

how are u all doing

#

have you updated to the latest version of discord
i kinda not like the new icons

#

of microphone and deafen end call

#

exam sucks a lot

#

a lot and a lot

#

it's tomorrow and that also offline no google

#

sometimes I think
I should just go like

#

fuck this i will just chill

#

what's going in your life

#

@obsidian dragon

warped raft
#

see you all later

earnest crag
#

.env

#

load.env]

#

python

wind raptor
#

!pypi python-dotenv @earnest crag

wise cargoBOT
obsidian dragon
#
actual_reason = str(lowercase_preset_reasons.get(reason.lower()), str(reason))
#

<!1182259904761835540>

#
user = "John";
console.log(`hello ${user}`);
brisk bridge
#

hi

#

guys wana see the game i made in pixi.js , i made it related to santa

wind raptor
#
def run_query(sql: LiteralString) -> None:
    ...

def caller(arbitrary_string: str, literal_string: LiteralString) -> None:
    run_query("SELECT * FROM students")  # OK
    run_query(literal_string)  # OK
    run_query("SELECT * FROM " + literal_string)  # OK
    run_query(arbitrary_string)  # type checker error
    run_query(  # type checker error
        f"SELECT * FROM students WHERE name = {arbitrary_string}"
    )
#

from typing import LiteralString

rapid chasm
#
preset_reasons = {
    "NSFW": "No NSFW or inappropriate content. This includes pornographic material, foul language, violence, and any other content that is widely found to be offensive and not suitable for public environments.",
    "Spam": "Do not spam or otherwise misuse any channels. Keep content in their respective channels. Prevent yourself from splitting words or use several lines to say very little (line splitting)."
}

@client.command(name='warn')
async def warn(ctx, member: discord.User = None, *, reason: str = None):

        # Create a new dictionary where all the keys are lowercase
        lowercase_preset_reasons = {key.lower(): value for key, value in preset_reasons.items()}

        # Use the preset reason if the user provided one of the keys in the dictionary, otherwise use the user-provided reason
        actual_reason = lowercase_preset_reasons.get(reason.lower(), reason)
rugged root
#

Might be a bit scarce today. Got lots of stuff I have to be away from my desk for

wind raptor
#

preset_reasons: dict[LiteralString: str] = ...

rapid chasm
wind raptor
#

r"Profane"

rapid chasm
#

actual_reason = lowercase_preset_reasons.get(reason.lower(), reason)

rugged root
rapid chasm
scarlet halo
#

?

#

show entire code

#

oh nvm

#

you did i think

rapid chasm
scarlet halo
#

ive been here

rapid chasm
#
@client.command(name='warn')
async def warn(ctx, member: discord.User = None, *, reason: str = None):
        if member is None:
            # Create the embed
            return

        if reason is None:
            # Create the embed
            return
obsidian dragon
#

@wind raptor this is the model in game thing I was talking about

forest zodiac
#

reson : str | None = None

wind raptor
#

async def warn(ctx, member: discord.User | None = None, *, reason: str | None = None):

sturdy panther
#

Because None is not a User.

woeful salmon
#

@rapid chasm
outside of the discord.py specific stuff
typehinting isn't actual code its just a hint for any person reading the code or an IDE to see what type that member variable in this case is which they couldn't tell without is as python isn't strongly typed
member: discord.User = None is perfectly valid code but the type hint might make your IDE give you a warning that you hinted that member is a type of discord.User but gave it a value of None which doesn't match
meanwhile member: discord.User | None = None means that the member's type is either discord.User or None and then you give it a default value of None which now makes it so your IDE is now aware that this member variable can be of type None so if you try to use any properties or methods of the discord.User class it will warn you that you need to check if it isn't None before you can use it otherwise it could cause a runtime error

rugged root
#

hai reaper

woeful salmon
#

hello

modern yacht
#

@rugged root
The final results from the Code you provided

rugged root
#

Drum roll please

modern yacht
#

have to send it in bits

rugged root
#

!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
#

Just use the haste bin

sturdy panther
#
def double(value: int) -> int:
    return value * 2

print(double("1"))  # Valid but type checker screams at you.
modern yacht
#

:x

woeful salmon
#

next step write a wsgi compatible server using sockets???
https://www.youtube.com/watch?v=WqrCnVAkLIo

WSGI is the foundation of most Python web frameworks, but there's a good chance you've never had to interact with it directly. In this talk we'll explore why it exists, how it works, and what the heck it's doing in your stack.

A great web framework abstracts away all the low-level stuff so that you can focus on the core functionality of your ap...

โ–ถ Play video
rugged root
#

!e print(-5 % 10)

wise cargoBOT
#

@rugged root :white_check_mark: Your 3.12 eval job has completed with return code 0.

5
woeful salmon
#

cuz you'd probably be interested

woeful salmon
cunning burrow
#

hello everyone

woeful salmon
#

hello

cunning burrow
#

solnishko

#

yep

#

u right

#

i`m lazy to change it

#

but i will just for u

#

u got it bro

ivory flower
#

thanks google translate solnishko

modern yacht
#

Here are the results all green checks mean code passed @rugged root

rugged root
idle vector
wind raptor
#

!stream 444818787737272321

wise cargoBOT
#

โœ… @idle vector can now stream until <t:1701963681:f>.

mystic lily
#

can anyone help i keep getting 0xc0000135 - status_dll_not_found (not python but i need help)

woeful salmon
#

generally in css we prefer to only modify the min-height and max-width rather than height and width

ivory flower
#

like giving more specific part to the GPT e.g. which section to read / summarize / extracting key takeaways ...etc

scarlet halo
#

hey

woeful salmon
#

for copilot the thing i don't like is that it gets forced on your taskbar with windows update

wet dove
#

why cant i run pip install command in cmd, . its not recogonised as internal or external command?

woeful salmon
#

@rugged root i told this to mustafa but i think i didn't tell you this but haskell gave me so much pain that even i had to stoop to asking chatgpt to help and it made me spend 1 hour extra for no reason after which i had to just rewrite the entire thing myself again

woeful salmon
wind raptor
#

!stream 386307484740222987

wise cargoBOT
#

โœ… @rapid chasm can now stream until <t:1701966027:f>.

woeful salmon
#

btw @rugged root F# has the worst editor support outside of visual studio that i've ever seen

#

the neovim versions of its tree-sitter module and its lsp don't work well and vscode extension also doesn't highlight it properly or give proper autocomplete

#

christmas

#

santa

#

spooky

stark river
#

tree

#

o i c

mystic lily
#

0xC0000135 - STATUS_DLL_NOT_FOUND

stark river
#

just get the dll from the net

rugged root
#

I'm wary about that

stark river
#

yes that is true

mystic lily
#
DayZ Troubleshooting Report

Sorry for the inconvenience.
Please report this on DayZ Feedback Tracker (https://feedback.dayz.com). Thanks to you we may fix the issue faster.


----------------------
Process exit
----------------------
Exit code:           0xC0000135 - STATUS_DLL_NOT_FOUND
Running time:        00:00:13.6063940


----------------------
System information
----------------------
Date:                2023-12-07 16:08:35 / 2023-12-07 16:08:35 +00
Current dir:         D:\steam\steamapps\common\DayZ
Command line:        D:\steam\steamapps\common\DayZ\DayZLauncher.exe
CLR version:         4.0.30319.42000
OS Version:          10.0.19045.0 (Microsoft Windows NT 10.0.19045.0)
OS 64 bit:           True
Process 64 bit:      False
Culture:             en-GB
UI Culture:          en-GB


----------------------
Last game report
----------------------
not provided
rapid chasm
#

@woeful salmon
Your code looks much better now! However, thereโ€™s still one more optimization you can make. Currently, youโ€™re checking if a member is in the users_queue_sorted list for every member in voice_channel.members. This results in a time complexity of O(n^2), which can be inefficient if both lists are large.

To improve this, you can convert users_queue_sorted to a set, which allows for O(1) membership tests. Hereโ€™s how you can do it:

    # Sort users_queue by ready_time
    users_queue_sorted = sorted(users_queue, key=lambda x: x.get("ready_time", datetime.datetime.min))

    # Convert users_queue_sorted to a set for efficient membership tests
    users_queue_set = set(user["member"] for user in users_queue_sorted)
#

True or false?

woeful salmon
#

what was the original code for it?

#

ah yeah the set thing can help

rapid chasm
#
    # Get the voice channel
    voice_channel = ctx.guild.get_channel(712072729406472374)

    # Sort users_queue by ready_time
    users_queue_sorted = sorted(users_queue, key=lambda x: x.get("ready_time", datetime.datetime.min))

    # Separate users into "Ready" and "Not ready"
    ready_users = []
    not_ready_users = []
    for member in voice_channel.members:
        if member in [user["member"] for user in users_queue_sorted]:
            ready_users.append(member)
        else:
            not_ready_users.append(member)

    # Create strings for "Ready" and "Not ready" users
    ready_string = '\n'.join([f'{member.mention}' for member in ready_users])
    not_ready_string = '\n'.join([f'{member.mention}' for member in not_ready_users])```
woeful salmon
#

does the order of the members matter?

stark river
#

iirc sets don't keep order

woeful salmon
#

if not then this does make sense

users_queue_set = set(user["member"] for user in users_queue_sorted)
woeful salmon
# stark river iirc sets don't keep order

yep a set is just a hashmap / dictionary without the values
so what its doing under the hood is just hashing the value and then using the hash to determine where in the internal array its going to store the value for that hash

#

making the order completely random

stark river
#

definitely faster than an array lookup then

woeful salmon
#

yep

rapid chasm
rugged root
#

Sets are awesome

stark river
#

then you need an array

woeful salmon
rapid chasm
woeful salmon
#

what's the point of sorting the users_queue btw?

rapid chasm
stark river
#

i dont know why but i just remembered bogosort ๐Ÿคฃ

rugged root
#

I love bogosort's time complexity

#

Best case of 1, worst case of infinity

woeful salmon
rapid chasm
stark river
#

pass off the sorting to another process

woeful salmon
rugged root
rapid chasm
# woeful salmon also to summarize my answer here is basically yes do use the set like it says it...

Code:

    # Get the voice channel
    voice_channel = ctx.guild.get_channel(712072729406472374)

    # Sort users_queue by ready_time
    users_queue_sorted = sorted(users_queue, key=lambda x: x.get("ready_time", datetime.datetime.min))

    # Separate users into "Ready" and "Not ready"
    ready_users = []
    not_ready_users = []
    for member in voice_channel.members:
        if member in [user["member"] for user in users_queue_sorted]:
            ready_users.append(member)
        else:
            not_ready_users.append(member)

    # Create strings for "Ready" and "Not ready" users
    ready_string = '\n'.join([f'{member.mention}' for member in ready_users])
    not_ready_string = '\n'.join([f'{member.mention}' for member in not_ready_users])```
woeful salmon
#
    # Get the voice channel
    voice_channel = ctx.guild.get_channel(712072729406472374)

    # Sort users_queue by ready_time
    users_queue_sorted = sorted(users_queue, key=lambda x: x.get("ready_time", datetime.datetime.min))
    users_queue_set = set(user["member"] for user in users_queue_sorted)
    # Separate users into "Ready" and "Not ready"
    ready_users = []
    not_ready_users = []
    for member in voice_channel.members:
        if member in users_queue_set:
            ready_users.append(member)
        else:
            not_ready_users.append(member)

    # Create strings for "Ready" and "Not ready" users
    ready_string = '\n'.join([f'{member.mention}' for member in ready_users])
    not_ready_string = '\n'.join([f'{member.mention}' for member in not_ready_users])
#

this is better like the gpt said
i was just being curious about where the actual users_queue_sorted["ready_time"] was actually being used which is not relavant

thin fox
#

when memory piles up, specially if the software uses some sort of cloud function, it can become expensive

woeful salmon
#

for hashmaps?

#

the speed hashmaps provide can really help sometimes

1 of the 2 main optimization that improved GTA V's loading time by 70% (by a non-rockstar employee) was just replacing an array they were using with a hashmap

#

but memory is ineed a tradeoff you have to keep in mind

thin fox
#

also, Insertion sort / merge sort is advantageous when the 'write' operation is expensive, all sorts are good, just depends on use case

woeful salmon
#

no never use bubble sort

#

o-o

thin fox
#

there must be some use for that too

rapid chasm
#

@peak depot

        title=f"1 player is currently in the queue" if len(
            users_queue) == 1 else f'{len(users_queue)} players are currently in the queue',```

```py
        title=f"{len(users_queue)} player{' is' if len(users_queue) == 1 else 's are'} currently in the queue",
woeful salmon
#

maybe i haven't seen one yet maybe i will in the future xD you never know

thin fox
woeful salmon
#

maybe if you're like super limited on memory where an in-place replacement is better?

#

idk

thin fox
#

quicksort uses inplace swap, and its faster...

woeful salmon
#

so you can't call more functions

thin fox
#

btw, everytime i look at your profile pic, it reminds me of..

woeful salmon
#

Charlotte?

#

or Noodles?

thin fox
woeful salmon
#

pithink i don't know about that

thin fox
#

I know, its odd, but just a illusion I gues

#

only when view in the zoomed out circle beside your name

woeful salmon
#

its the hair

thin fox
#

ah, thank god, I was feeling embarrased

willow light
thin fox
peak depot
woeful salmon
#

yeah

thin fox
#

yea it was even smaller few months ago, finding that image

willow light
woeful salmon
#

i gotta go for now cya guys ๐Ÿ™‚

thin fox
# thin fox

one of the twin kitties, their father is also orange

#

Sometimes I feel cats are the derpiest animals out there, but other times I see centuries old calmness and wisdom in their eyes

willow light
coarse rock
#

dogey

#

catto

#

horsey

gentle flint
#

358 miles 6 furlongs

thin fox
#

gotta go, zonk

rugged root
#

Stupid similar name bs

gilded rivet
gentle flint
willow light
#

He never managed to figure out how I found him

gilded rivet
#

@willow light According to this alpha wolves exist

willow light
#

Peer reviewed journals please

whole bear
#

everyone loves peer review until they try to publish ๐Ÿ˜ญ

somber heath
#

@brittle flame ๐Ÿ‘‹

brittle flame
#

hello

#

can you help me with something

#

how can shre the code with you

#

?

somber heath
#

!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.

brittle flame
#

what that

#

?

#

is too long

#

can you ask me question about the code

#

?

#

course i have presentation

#

and my teachers going ask me some questions

#

i want to see if im ready

#

what the qeustion can you type

#

you answer

#

is really heavy for me

#

english not my best leaguage

somber heath
#

"Given that wildcard imports are considered, by convention, best avoided, why have you elected to use one?"

#

"Given that use of the global keyword is generally discouraged, why have you elected to use it? What alternatives exist to the use of the global keyword?"

brittle flame
#

course im a new to progaming and tkinker it was the easy for me to use

#

i just globa course i have to use the varible in the functions for other part of the code

somber heath
#

"What does PEP8 prescribe for name conventions, and does your code adhere to them? If not, why not?"

brittle flame
#

well i didnt' falllow pep8 form i dont really good at cooding so this my first project i hope next time i do it better

somber heath
#

"What is truthiness and falsiness? How could you use it to simplify some of your conditionals?"

brittle flame
#

i use my own style so it can easy to read the code and understand my code

#

yooo

#

wtf this stuuff questions

#

omg

somber heath
#

"When comparing objects to True and False, what is the preferred comparison operator?"

brittle flame
#

thanks

somber heath
brittle flame
#

thanks

#

i know it dosent look like a clear code

#

this my first project

#

i did that with basic concepts of pythons

#

thabnks brother

#

you are god

#

<33

#

thanks you i have to study those questions

somber heath
#

@violet thorn ๐Ÿ‘‹

violet thorn
elder knot
somber heath
elder knot
#
somber heath
#

@brave thicket ๐Ÿ‘‹

elder knot
whole bear
#

@carmine sentinel @whole bear you guys are Abe and Aaron from Primer

#

be careful, though, you may trigger a self involving paradox ๐Ÿ˜ฎ

#

(make sure to turn your phone off)

outer zinc
#

totally normal beginner behavior so no worries though

outer zinc
#

true typically is synonymous with "exists"

#

0 doesn't really exist, so its falsy

#

1 exists, so its true

#

objects, like the desk in front of you or a player in mario, exist, so they are true

somber heath
#

You understand I wasn't asking this for myself.

outer zinc
outer zinc
little pond
#

Hello everyone,
What is the practical application of recursion ?

whole bear
vocal basin
#

that'd be stack-overflowing not practical

#

some languages actually will force to use recursion but those normally have optimisations to avoid stack overflow

little pond
#

I mean, Is it something that is still used in the industry or is it something that was used earlier but now we have found workarounds this approach?

vocal basin
#

do you mean recursion as function call recursion or type recursion?

little pond
#

type recursion

vocal basin
#

used for data structures; for example, trees

#

and algorithms on those data structures would often involve function call recursion because:
execution structure follows data structure,
easier to write,
sometimes faster because data for backtracking is on call stack (not requiring heap allocations)

#

latter can be achieved with iterative algorithms too, but it would require knowing the stack size in advance

little pond
#

Thanks!

odd granite
#

@coarse turret

#

good wbu

#

i dont got voice chat perms

#

Go ahead

#

L

#

ye idm

outer zinc
#

try drawing a tree

#

that is a naturally recursive task

#

you draw a branch that has a branch that has a branch that has a branch

#

try scanning a file system

#

that is a naturally recursive task

#

you look at a folder. then for each of its sub folders, you look at their subfuolders, of whom for each of their subfolders, you look at their subfolders, etc.

little pond
#

I see, Thanks!

cinder dawn
#

good morning

cinder dawn
#

Hello!

#

i havent been here in a while. Howve you been opal!

#

whys that

#

ahh so life

#

i lost my motivation to code for a bit so i left for 2 monthes

#

so im just here picking up from where i left off

#

yes exactly

#

quite happy to know im not the only one losiing slight motiation

eager thorn
#

๐Ÿฅฑ good morning

#

thought I'd chat for a bit till client wakes up for a update

#

c#

#

is their a command that looks up a certain lib in this server, i cannot remember it to save my life.

#

yes Pypi

cinder dawn
#

kinda true

somber heath
#

@silent plume ๐Ÿ‘‹

silent plume
#

go-rav go-yel

#

@somber heath

somber heath
#

@whole bear ๐Ÿ‘‹

#

@rocky bluff ๐Ÿ‘‹

rocky bluff
somber heath
#

!voice ๐Ÿ‘‡

wise cargoBOT
#
Voice verification

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

dense ibex
#

=> [worker builder 7/7] RUN mkdir __pypackages__ && pdm sync --prod --no-editable 1506.2s

cinder dawn
#

hi hemlock

dense ibex
#
FROM python:3.11-slim-buster as builder

RUN pip install -U pip setuptools wheel
RUN pip install pdm

COPY pyproject.toml pdm.lock /project/
COPY src/ /project/app

WORKDIR /project
RUN mkdir __pypackages__ && pdm sync --prod --no-editable

FROM python:3.11-slim-buster

ENV PYTHONPATH=/project/pkgs
COPY --from=builder /project/__pypackages__/3.11/lib /project/pkgs
COPY --from=builder /project/__pypackages__/3.11/bin/* /bin/

ENTRYPOINT ["python", "-m"]
CMD ["app"]
cinder dawn
#

type it in chat @whole bear

#

the library

dense ibex
#
# This is the amount of classifications the model will output,
# why it doesn't just output them all by default I don't fucking know.
TOP_K = 9
pipe = pipeline(
    "text-classification", model="KoalaAI/Text-Moderation", top_k=TOP_K,
)

KEKW

oblique ridge
cinder dawn
oblique ridge
#

!e ```py
print(2023-2011)

wise cargoBOT
#

@oblique ridge :white_check_mark: Your 3.12 eval job has completed with return code 0.

12
oblique ridge
#

inshallah

#

lmfao jake

dense ibex
#

!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.

dense ibex
#

@pure token

pure token
oblique ridge
#

what

#

lmao

eager thorn
oblique ridge
#

Ctrl + C Alt + Tab Ctrl + V
damn that's tough

#

you gotta be descriptive

pure token
#

import java.util.HashMap;

public class Customer {
private HashMap<Integer, CustomerInformation> customers;
private static int id = 0;

public Customer() {
    customers = new HashMap<>();
}

public void createCustomer(int ssn, String name, String address, int phoneNumber) {
    CustomerInformation customer = new CustomerInformation(id, ssn, name, address, phoneNumber);
    customers.put(ssn, customer);
    id += 1;
}

public CustomerInformation getCustomerSSN(int ssn) {
    return customers.get(ssn);
}

public CustomerInformation getCustomerID(int id) {
    return customers.get(id);
}

}

class CustomerInformation {
private int id;
private int ssn;
private int pNumber;
private String name;
private String address;

public CustomerInformation(int id, int ssn, String name, String address, int pNumber) {
    this.id = id;
    this.ssn = ssn;
    this.name = name;
    this.address = address;
    this.pNumber = pNumber;
}

}

oblique ridge
#

```java
{java}
```

#

you don't need the curlies, that's just where the code goes

#

sign tax

eager thorn
oblique ridge
#

lol

#

||syntax||

#

:hemshake:

#

tbf dictionary is a nice word to use for the data type

dense ibex
#

dict["deez"] = "nutz"

oblique ridge
#

ye it's all sugar bb

#

F#

rugged root
faint ermine
dense ibex
#

fhttps://projects.raspberrypi.org/en/projects/noobs-install

#

@faint ermine

white canopy
#

@cinder dawn is a scammer.

wind raptor
#

!stream 193219019292016641

wise cargoBOT
#

โœ… @pure token can now stream until <t:1702049018:f>.

stuck furnace
#

@dull sluice background noise, can you mute please?

#

Thank

cinder dawn
# white canopy <@1043542610842751057> is a scammer.

You paid me $20 via fiverr nearly 6 monthes ago to make you a sneaker bot. I did this but you wanted more and more out of it (like making it buy shoes from nike, adidas, etc which I told you wasn't possible) that wasn't part of the contract. I sent you the bot that you asked for and you gave me the $20. This conversation is over.

white canopy
rugged root
#

@white canopy Keep off server beef off the server

white canopy
rugged root
#

If you feel wronged, report it to Fiverr

#

It has nothing to do with here

wise cargoBOT
#

Objects/dictobject.c line 1926

PyDict_SetItem(PyObject *op, PyObject *key, PyObject *value)```
white canopy
#

@cinder dawn right, Iโ€™ll apologise.

I understand what I was asking for was a lot for little money. I completely understand that.

I also understand that there was a lot of miscommunication from both parties.

All the best.

rugged root
#

I think that's the most civil resolution to something I've seen on this server

white canopy
rugged root
#

Glad to hear it

cinder dawn
white canopy
#

C# is better XD

rugged root
#

Yes

#

Yes it is

#

.NET is dope

stark river
#

Hey gang, in this MERN auth tutorial, you'll learn how to protect certain API routes from unauthenticated users.

โญโญ Get the full course now (without ads) on the Net Ninja Pro site:
https://netninja.dev/p/mern-auth-tutorial/

โญโญ Get access to all free & PREMIUM courses on Net Ninja Pro:
https://net-ninja-pro.teachable.com/p/net-ninja-pro/

๐Ÿฑโ€๐Ÿ’ป A...

โ–ถ Play video
cinder dawn
#

can u relate much to "the it crowd" @rugged root

golden sonnet
#

๐Ÿ‘‹

rugged root
cinder dawn
#

as you say that I just sent a message to chatgpt

golden sonnet
#

@uncut meteor sorry to ping
does your email button on your site work for you?
cause i click it and nothing happens

uncut meteor
#

looks like it does on my side, what browser you on?

uncut meteor
#

i'll check on it, i've got a checklist of things to fix and I'll add it

#

ty

rugged root
#

It may be a system default issue, too

golden sonnet
#

maybe cause i don't have a email app installed?

rugged root
#

It'll open your default email program

#

Yeah

cinder dawn
#

i work at apple but not the good kind of working

rugged root
#

It's a mailto: link

eager thorn
#

works for me.

rugged root
#

Which will try to open your email app

golden sonnet
#

so doesn't work with gmail web client

rugged root
#

I don't think so, not without some preferences or settings set in gmail

oblique ridge
#

unless you set gamil on browser as your default mail client

uncut meteor
#

unless you have it as your OS default mail app

rugged root
#

But I'm not 100% sure, I use Outlook

golden sonnet
#

ok then
so it's a me problem

cinder dawn
#

at my college my photoshop wasn't working. I put a ticket in through

#

to IT

#

6 monthes later they respond with "turn it off and on"

golden sonnet
#

that works 90% of the time :p

rugged root
#

Meeting time

cinder dawn
#

the computers were turned off and on MULTIPLE times during that 6 monthes

oblique ridge
#

idk why but i remembered this dumbass shortcut again

golden sonnet
#

well at least you didn't have to do graphic work in that time

oblique ridge
#

if you're on windows, please do Ctrl + Shift + Alt + Win + L

#

unless you're streaming

golden sonnet
#

linkedin?

#

they put their time into that instead of providing us with basic sdk ๐Ÿคฆโ€โ™‚๏ธ

slow yew
#

guys

#

i need a small

#

thing to work on

#

plz

#

help

golden sonnet
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.

slow yew
#

!project

golden sonnet
slow yew
#

any ideas ? aside from the pro level

#

( the one in the website)

golden sonnet
#

there are basic stuff there
but if you want problems to solve cs50p has a good set

slow yew
#

im a begginer

#

send link pl z

pine depot
#
switch(expression) {
  case x:
    // code block
    break;
  case y:
    // code block
    break;
  default:
    // code block
}
vivid palm
#

!tvmute 482873542099206154 2w don't spam to meet #voice-verification requirements. you can listen but you need legitimate text and membership activity before you can voice verify

wise cargoBOT
#

:incoming_envelope: :ok_hand: applied voice mute to @sick dove until <t:1703263402:f> (14 days).

pine depot
scarlet halo
#

i am infinitely thankful for mr. hemlock for telling me about the blessed module

pine depot
stark river
#

is my skill section good enough?

oblique ridge
#

i like it
but dont put that on every job app
change it up for every job depending on what they're looking for

#

it's a pita but it's what you gotta do

pine depot
#

!e

fprintf('fprintf is a dumb function')
wise cargoBOT
#

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

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 1, in <module>
003 |     fprintf('fprintf is a dumb function')
004 |     ^^^^^^^
005 | NameError: name 'fprintf' is not defined. Did you mean: 'print'?
scarlet halo
#

what u guys talking abt

cinder dawn
scarlet halo
#

wait in what

#

ah

pine depot
#

!e

print(f"this is much better")
wise cargoBOT
#

@pine depot :white_check_mark: Your 3.12 eval job has completed with return code 0.

this is much better
scarlet halo
#

sorry im stupid but what is matlab

oblique ridge
#

programming language

scarlet halo
#

cool

pine depot
#

prog language

oblique ridge
oblique ridge
pine depot
#
y == -1 + 2 * x
lavish rover
#

if not you can rent a server from AWS ๐Ÿ™‚

#

idk but you help pay me

modern yacht
#

Hey which coc extension would you prefer for python code interpretation for nvim

scarlet halo
#

hemlock i kinda dont like your pfp rn

#

it was better before

#

no offense

rugged root
#

But it fits my having too much caffeine

quartz plank
#

Hello World

#

Bro i need someone to talk to

pine depot
#

well come to vc 0

rugged root
pine depot
#

ru server muted

quartz plank
#

Yes but i can't talk because i didnt reach the message threshold of 50 messages

rugged root
#

Yeah just chill up here and talk with us in text

pine depot
#

ull get there pretty quick

rugged root
#

We pay attention to the text channel so no one gets left out of the convo

lavish rover
quartz plank
#

Ah ok

#

Well i joined the channel

#

I'm so bad meeting any requirements in discord servers like this

#

i never even got around using midjourney because of this lmao

#

I didnt get the ajar joke. its just not funny is it

cinder dawn
lavish rover
#

it's not a door, it's a jar

rugged root
#

If a door is partly open, it's said to be ajar

cinder dawn
#

ohh

quartz plank
#

i wonder how many messages i still have to type

rugged root
#

Do !user in #bot-commands

quartz plank
#

ah nice that's useful, thanks

#

im halfway there

amber raptor
#

@rugged root [char[]]([char]'a'..[char]'z')

quartz plank
#

I will not leave until i reached the 50 messages

#

but it is kinda hard haha. is it best to chat here, in this channel? or is there an even more general one?

rugged root
#

We have some OT channels

#

!ot

wise cargoBOT
rugged root
#

But there's tons of channels. Topical ones for subjects you might be interested in

oblique ridge
#

!e ```py
[chr(i)for i in range(97,123)]

wise cargoBOT
#

@oblique ridge :warning: Your 3.12 eval job has completed with return code 0.

[No output]
stark river
#

lorem1
lorem2

oblique ridge
#

print gdi

rugged root
oblique ridge
#

!e ```py
print([chr(i)for i in range(ord('a'),ord('z'))])

wise cargoBOT
#

@oblique ridge :white_check_mark: Your 3.12 eval job has completed with return code 0.

['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
modern yacht
#

Yooh any one using Nvim

stark river
#

yes

rugged root
#
$letters = "A", "E", "I", "M", "Q", "U", "Y", "Z"
$parentFolder = "C:\ParentFolder"

foreach ($letter in $letters) {
    $start = [char]::Parse($letter)
    $end = [char]::Parse($letter) + 3
    $folderName = "$($start)-$($end)"
    $folderPath = Join-Path $parentFolder $folderName
    New-Item -ItemType Directory -Path $folderPath
}
amber raptor
modern yacht
stark river
#

no.. that's outdated

#

use the lsp

modern yacht
#

well there is no difference in functionality they both do kinda the same thing

#

right??

stark river
#

lsp uses lazy loading or something so it is faster

#

coc is sync

modern yacht
#

mm never got the idea of lazy loading

pine depot
#
while read dirname others; do
    mkdir "$dirname"
done < list.txt
modern yacht
#

shoot now i have to remove everything i have with coc

#

are you using lua or vimscript

stark river
#

lua

modern yacht
#

deem how old am i then

#

i use vimscript will that work with lsp

amber raptor
#
$a=[char[]]([char]'a'..[char]'z')
$a[0..3]
a
b
c
d```
stark river
#

it should

#

but neovim uses lua by default so never heard anyone change it

modern yacht
#

well i use vimscript but it's quite a hassel getting new pluggins since they all tend to use lua

#

have no knowledge of lua at all

stark river
#

doesn't make any diff lua vimscript

#

perf is the same

amber raptor
#
$a=[char[]]([char]'a'..[char]'z')
$a[0..3]
a
b
c
d
$start = 0
"Folder$($a[$start]) - Folder$($a[$start+3])"
Foldera - Folderd```
modern yacht
#

mind sharing your link to your config

stark river
#

one sec

rugged root
#
 'a'..'Z'
a
`
_
^
]
\
[
Z
short owl
#

can use a GUI to automate scripts

rugged root
#

Oh for sure

amber raptor
short owl
#

kinda like a BATMAN tool belt of pre-defined BASH , other scripts needed at a instant

tepid mantle
#

good morning guys

rugged root
#

Huh. Also forgot that if you do 'z'..'a', it'll give you the alphabet in reverse

short owl
#

LM = compartmentalization

tepid mantle
#

uhhhh

stark river
modern yacht
lavish rover
modern yacht
cinder dawn
#

listen to the sounds

#

the sounds area amazing

#

are

#

id like an apology for having to play this

short owl
#

whats up with UNITY , is it the new standard or will it just be PAYWARE

stark river
cinder dawn
#

ive taught myself to teleport

lavish rover
short owl
#

neato @lavish rover

modern yacht
#

shoot my best score so far

stark river
tepid mantle
lavish rover
short owl
#

@rugged root why are there not 100 soundboards in this room

tepid mantle
modern yacht
short owl
#

mosquitos size of spitfires in Florida ?

modern yacht
#

hey @lavish rover having trouble with linked list and memory leak issue while learning c
mind helping out with resources

modern yacht
lavish rover
#

Code from video: https://editor.p5js.org/BarneyCodes/sketches/SYf2Ull48

Mandelbrot Wikipedia: https://en.wikipedia.org/wiki/Mandelbrot_set

When the Mandelbrot set is visualised it produces some amazing fractal patterns. A while ago I made a Mandelbrot plotter using P5js but it was too slow to let me explore the fractal in real time, so in this...

โ–ถ Play video
stark river
lavish rover
rugged root
#

๐ŸŽถ He was a shader toy, I'll render you later boy ๐ŸŽถ

modern yacht
hallow warren
short owl
#

Avril Lavine @rugged root

hallow warren
golden sonnet
#

๐Ÿ‘‹

#

i have a css problem
anyone up for a look?

stark river
#

show

#

visibility: "visible";

modern yacht
#

is money scars all over

golden sonnet
#

@rugged root can i screen cast my page?

rugged root
#

!stream 999482770957021204

wise cargoBOT
#

โœ… @golden sonnet can now stream until <t:1702062468:f>.

stark river
#

you want height: 100vh; ?

golden sonnet
stark river
#

what do you want

golden sonnet
#

i want the white part that i show to not be :p

stark river
#

use

.about {
  height: 100vh;
}
golden sonnet
#

.about being the <body>?

stark river
#

about is the about page assuming you used something like div class="about"

golden sonnet
#

it's a <section> actually
inside <main>

stark river
#

you can use main or section for 100vh depending on what you want

golden sonnet
#

o that did actually work

stark river
#

if you don't know view port height you need to learn css again . your fundamentals are not strong

golden sonnet
#

i didn't really take anything on css
just learnd some stuff on the go

stark river
#

then learn css.. it is tricky and without learning it, you're going to run into many problems again and again.. basic ones

peak depot
#

@rugged root i need help

#

Discords gods are mean

cinder dawn
#

gym time over

peak depot
#

Gym is good

stark river
#

who's jim

brazen gazelle
whole bear
#

there should be a mcgym

cinder dawn
#

is that guy whos really into aliens stil here

peak depot
cinder dawn
whole bear
lavish rover
#

!e

def foo(x): x += x

a = 5
b = [10, 11]
foo(a)
foo(b)
print(a)
print(b)
wise cargoBOT
#

@lavish rover :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | 5
002 | [10, 11, 10, 11]
peak depot
#

Why are people in wheelchairs always right?
Because they never stand corrected.

lavish rover
frozen owl
#

the rite of passage of every programmer:

#

ray tracer for me as well, maybe after my chess engine

#

i need to up my physics and math

white canopy
#

@cinder dawn Are you able to unblock me? ๐Ÿ™‚

frozen owl
lavish rover
frozen owl
#

cool

#

thinking of making a raytracer in rust

#

my new favourite programming language

lavish rover
frozen owl
#

WOW

#

actually

#

is it in c++

lavish rover
#

yeah

frozen owl
#

cool

#

can yours render videos?

#

how long?

lavish rover
#

it can render individual frames and you can stitch them together

frozen owl
#

how about draggable 3d scenes

#

like blender

#

like 3d models with shit

#

i wanna build one

lavish rover
#

from my ray tracer

frozen owl
#

diy blender any%

lavish rover
#

no I don't have any user interaction

whole bear
#

{}

frozen owl
lavish rover
whole bear
#

source

wise loom
lavish rover
whole bear
#

print("{source}")

frozen owl
oblique ridge
#

what

#

!e ```py
spam = 'eggs'
print(f'i can now add {spam} in here without concatonating with +')

wise cargoBOT
#

@oblique ridge :white_check_mark: Your 3.12 eval job has completed with return code 0.

i can now add eggs in here without concatonating with +
oblique ridge
#

im dumb didn't use the variable name lol

frozen owl
dull sluice
#

They say learning languages is best from the natives then i started learning python

oblique ridge
#

goddamn fuck this puzzle

#

hint: ||pawn up in material||

frozen owl
#

imma paste this into my chess engine

oblique ridge
#

๐Ÿ˜ฉ

#

ooh you wrote your own?

frozen owl
#

work in progress

#

alphazero

brazen gazelle
#

rook a1?

oblique ridge
oblique ridge
brazen gazelle
#

then queen f2

#

wait no

#

I'm dumb

oblique ridge
oblique ridge
brazen gazelle
#

wiat is it not wrong?

#

OH WAIT

#

sorry I'm brain dead

oblique ridge
#

Ra1+ Kd2 Qf2+ is correct so far

brazen gazelle
#

ok ok

#

then rook takes pawn b2

oblique ridge
#

how? rook's on a1 rn no?

brazen gazelle
#

oh yeah mb

oblique ridge
brazen gazelle
#

thank you

rugged root
#

!stream 745015733238497330

wise cargoBOT
#

โœ… @terse garden can now stream until <t:1702069173:f>.

modern yacht
#

yeah mate

oblique ridge
#

@brazen gazelle ||i mispoke in vc about the rook trade. it's not queen trade definitely||

brazen gazelle
#

oh

oblique ridge
#

solution: ||Ra1+ Kd2 Qf2+ Qe2 Rxd1+ Kxd1 Qg1+ Qe1 Qxg2||

brazen gazelle
#

I got up to the Rxd1....

#

very annoying puzzle

oblique ridge
#

here's a fun one to make ya feel better

#

last one was rated 2361
this one is 2215
but puzzle ratings are also kinda trash af
this one is much easier imo

modern yacht
#

anyone able to explain this to me

terse garden
#

i coded that

#

in c++

#

using recursive backtracking

modern yacht
#

like a baby Not good at chess at all

terse garden
#

if you want to see the code

modern yacht
#

shoot refactor it to python

terse garden
#

i dont know how to do that its better in c++ anyway

#

and the way they structured it, there result, is weird it shouldnt be in that form

modern yacht
#

i have no idea in c++ just toss in the explanation

frozen owl
terse garden
#

int main (int argc, char * const argv[])
{
Board x;

int board_size;
sscanf (argv[1], "%d", &board_size);

x.nQueens(board_size);

return 0;

}

#

initialize board like this

#

bool solve(int col)
{
if (col >= size) // the board is complete
{
number_of_solutions++;
std::cout << std::endl << size << "x" << size << " Solution #: " << number_of_solutions;
print_board();
}
else
{
bool found_at_least_one_solution = false;
// try placing a queen in each row.
for (int row = 0; row < size; row++)
{
if (is_this_position_safe(row, col))
{
chess_board[row][col] = 1;
if (solve(col+1)) // recursion
found_at_least_one_solution = true;
else
chess_board[row][col] = 0;
}
}
if (found_at_least_one_solution)
return true;
}
return false;
}

#

solve like this

#

leave the rest to you / hack your way through the problem and convert that to python

#

gl!

neat fable
#

I am not bot

lavish rover
#
def count_parameters(model):
    return sum(p.numel() for p in model.parameters() if p.requires_grad)
frozen owl
#
Total number of parameters: 4905357
#
somber heath
#

@topaz beacon ๐Ÿ‘‹

topaz beacon
#

Hey

#

@somber heath

somber heath
#

@flint valley ๐Ÿ‘‹

somber heath
#

@limber fulcrum ๐Ÿ‘‹

#

@rustic mantle :=

rustic mantle
#

@harsh bough Here

somber heath
#

!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.

rustic mantle
#

! paste

harsh bough
#

!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.

rustic mantle
#

!paste

harsh bough
rustic mantle
#

@somber heath See you soon.

#

Take care

harsh bough
somber heath
#

!zen

wise cargoBOT
#
The Zen of Python, by Tim Peters

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than right now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!

rapid chasm
#

@verbal zenith@somber heath

worthy token
#

Hello !

#

Anyone ever used Autogluon?

somber heath
#

@keen stirrup ๐Ÿ‘‹

#

@whole bear ๐Ÿ‘‹

#

!voice ๐Ÿ‘‹

wise cargoBOT
#
Voice verification

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

somber heath
#

@hollow otter ๐Ÿ‘‹

vocal basin
#

only now noticed this

whole bear
#

!voice

wise cargoBOT
#
Voice verification

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

somber heath
#

@tidal moth ๐Ÿ‘‹

verbal zenith
vocal basin
#

global

#

what WSGI server runner are you using?

#

is it multiprocessed?

#

global does not guarantee that it's only one instance

scarlet halo
#

hjelp

#

(not really)

keen stirrup
scarlet halo
#

i need a therapist

somber heath
#

@whole bear ๐Ÿ‘‹

vocal basin
#

three different ten-minute blocks

#

using save in post_save at all seems suspicious

#

because this way you may end up with partially correct state

#

for example, if you successfully committed the first part, but the second failed

#

another option is to check whether any changes would happen

scarlet halo
#

  โ•ญMain Menuโ•ฎ     
  โ”‚ Start Test โ”‚  
  โ”‚  Settings  โ”‚  
  โ”‚    Exit    โ”‚  
  โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ  

#

whyyyyyy

verbal zenith
scarlet halo
#

?

#

whats this

vocal basin
#

!e

print(f"{123:-^10}")
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.

---123----
somber heath
#

@severe wasp ๐Ÿ‘‹

verbal zenith
scarlet halo
#
def spaceout(value,length,space=' '):
    if (len(value) % 2) != 0:
        b = 1
    else:
        b = 0
    return space * ((length - len(value)) // 2) + str(value) + space * ((length - len(value) + b) // 2)
``` ive made this function that should space it out
#

works for other things

vocal basin
#

tbh, that probably shouldn't be with f-strings, since those have fixed width
I'd expect it to be dynamic instead (with least width possible)

scarlet halo
#

but not the title apparently

#

?

vocal basin
#

I don't think so
maybe yes

scarlet halo
#

print(spaceout(f"โ•ญ{spaceout(term.bold + title + term.normal,long,'โ”€')}โ•ฎ",term.width + len(term.normal) + len(term.bold) - 2)) this is a mess

verbal zenith
#

!e

x = 2
print(f"{123: ^x}")
wise cargoBOT
#

@verbal zenith :white_check_mark: Your 3.12 eval job has completed with return code 0.

7b
scarlet halo
#

7b

verbal zenith
#

!e

x = 10
print(f"{123: ^x}")
wise cargoBOT
#

@verbal zenith :white_check_mark: Your 3.12 eval job has completed with return code 0.

7b
verbal zenith
#

!e

x = 2
print(f"{123:x}")
wise cargoBOT
#

@verbal zenith :white_check_mark: Your 3.12 eval job has completed with return code 0.

7b
vocal basin
#

!e

x = 10
print(f"{123: ^{x}}")
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.

   123    
vocal basin
#

highlighting is not happy about it

vocal basin
#

(I don't have 3.6 installed to test)

verbal zenith
#

!e

def centered(text, length, space=" "): print(f"{text:{space}^{length}}")

centered("Hello world", 15)
centered("123", 10, "-")
wise cargoBOT
#

@verbal zenith :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 |   Hello world  
002 | ---123----
vocal basin
#

now downloading python:3.6

#

used to be 3.11/3.10

#

now only 3.12, I think

scarlet halo
#

snekbox

vocal basin
scarlet halo
#

wait should i bring out MY snake?

vocal basin
#

the same way as that

scarlet halo
#

the one on my profile

vocal basin
#

!e

print("{: ^{}}".format(123, 10))
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.

   123    
vocal basin
#

time to binary-search versions

#

(downloading 3.3)

#

works on 3.3

#

I don't think I can run 3.0

scarlet halo
#

shes here!

vocal basin
#

not even 3.1

wise cargoBOT
#

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

001 |   File "/home/main.py", line 3
002 |     print(f"{txt: {sym}10}"
003 |          ^
004 | SyntaxError: '(' was never closed
vocal basin
#

3.2 docker image is outdated

verbal zenith
#

!e

sym = "^"
txt = "Hello"
print(f"{txt: {sym}10}")
wise cargoBOT
#

@verbal zenith :white_check_mark: Your 3.12 eval job has completed with return code 0.

  Hello   
vocal basin
#

< left
> right
^ centre

#

(and there's also zfill for numbers, I think)

wise cargoBOT
#

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

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 2, in <module>
003 |     print(f"{txt:->10=<4}")
004 |             ^^^^^^^^^^^^^
005 | ValueError: Invalid format specifier '->10=<4' for object of type 'str'
somber heath
#

@high mantle ๐Ÿ‘‹

verbal zenith
#

!e

txt = "Hello world!"
print(f"{txt:->10'='<4}")
wise cargoBOT
#

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

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 2, in <module>
003 |     print(f"{txt:->10'='<4}")
004 |             ^^^^^^^^^^^^^^^
005 | ValueError: Invalid format specifier '->10'='<4' for object of type 'str'
high mantle
ionic jungle
#

!e

txt = "Hello"
print(f"{txt:f'{'#'*10}'^10}")
wise cargoBOT
#

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

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 2, in <module>
003 |     print(f"{txt:{'#'*10}^10}")
004 |             ^^^^^^^^^^^^^^^^^
005 | ValueError: Invalid format specifier '##########^10' for object of type 'str'
vocal basin
verbal zenith
#

!e

txt = "Hello"
print(f"{txt:[-^10}")
wise cargoBOT
#

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

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 2, in <module>
003 |     print(f"{txt:[-^10}")
004 |             ^^^^^^^^^^^
005 | ValueError: Invalid format specifier '[-^10' for object of type 'str'
ionic jungle
#

!e

txt = "Hello"
print(f"{txt:'#'*10^10}")
wise cargoBOT
#

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

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 2, in <module>
003 |     print(f"{txt:f'{'#'*10}'^10}")
004 |             ^^^^^^^^^^^^^^^^^^^^
005 | ValueError: Invalid format specifier 'f'##########'^10' for object of type 'str'
high mantle
#

@somber heath How is it going ? โœจ

verbal zenith
#

!e

txt = "Hello"
print(f"{txt:{{^10}")
wise cargoBOT
#

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

001 |   File "/home/main.py", line 2
002 |     print(f"{txt:{{^10}")
003 |                   ^
004 | SyntaxError: f-string: expecting a valid expression after '{'
verbal zenith
#

!e

txt = "Hello"
print(f"{txt:{^10}")
wise cargoBOT
#

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

001 |   File "/home/main.py", line 2
002 |     print(f"{txt:{^10}")
003 |                        ^
004 | SyntaxError: closing parenthesis ')' does not match opening parenthesis '{'
ionic jungle
#

!e

txt = "Hello"
print(f"{txt:'#'*10^10}")
wise cargoBOT
#

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

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 2, in <module>
003 |     print(f"{txt:'#'*10^10}")
004 |             ^^^^^^^^^^^^^^^
005 | ValueError: Invalid format specifier ''#'*10^10' for object of type 'str'
verbal zenith
#

!e

txt = "Hello"
print(f"{txt:\{^10}")
wise cargoBOT
#

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

001 | /home/main.py:2: SyntaxWarning: invalid escape sequence '\{'
002 |   print(f"{txt:\{^10}")
003 |   File "/home/main.py", line 2
004 |     print(f"{txt:\{^10}")
005 |                         ^
006 | SyntaxError: closing parenthesis ')' does not match opening parenthesis '{'
vocal basin
#
>>> "".ljust(10, "12")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: ljust() argument 2 must be char, not str
vocal basin
#
>>> "".ljust(10, "12")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: The fill character must be exactly one character long
#

in 2.7 and in 3.11

high mantle
ionic jungle
#

!e

txt = "Hello"
cursed = '#'*10
print(f"{txt:{cursed}^10}")
wise cargoBOT
#

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

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 3, in <module>
003 |     print(f"{txt:{cursed}^10}")
004 |             ^^^^^^^^^^^^^^^^^
005 | ValueError: Invalid format specifier '##########^10' for object of type 'str'
ionic jungle
#

!e

txt = "Hello"
cursed = '#'
print(f"{txt:{cursed}<10}")
wise cargoBOT
#

@ionic jungle :white_check_mark: Your 3.12 eval job has completed with return code 0.

Hello#####
verbal zenith
#

@scarlet halo

def spaceout(value,length,space=' '):
    if (len(value) % 2) != 0:
        b = 1
    else:
        b = 0
    return space * ((length - len(value)) // 2) + str(value) + space * ((length - len(value) + b) // 2)
ionic jungle
#

!e

txt = "Hello"
cursed = '#'
print(f"{cursed*10}{txt}")
wise cargoBOT
#

@ionic jungle :white_check_mark: Your 3.12 eval job has completed with return code 0.

##########Hello
vocal basin
#
f"{s:#<10}"
s.ljust(10,"#")
scarlet halo
#

  โ•ญโ”€Main Menuโ”€โ”€โ•ฎ  
  โ”‚ Start Test โ”‚  
  โ”‚  Settings  โ”‚  
  โ”‚    Exit    โ”‚  
  โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ  
``` fixed it!
vocal basin
#
s.ljust(10,"#")
(10*"#"+s)[-10:]
#

idk if it even works

scarlet halo
#

now theres only this ```

โ•ญโ”€Test Completed!โ”€โ•ฎ
โ”‚ Redo Test โ”‚
โ”‚ wpm: 232.0 โ”‚
โ”‚ raw_wpm: 232.0 โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

vocal basin
#

!e

s = "test"
print(f"{s:#<10}")
print(s.ljust(10,"#"))
print((s+10*"#")[:10])
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | test######
002 | test######
003 | test######
vocal basin
#

only took three attempts

ionic jungle
#
f"{s:='poop'}{'#'*10-len(s)}"
#

!e

f"{s:='poop'}{'#'*10-len(s)}"
wise cargoBOT
#

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

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 1, in <module>
003 |     f"{s:='poop'}{'#'*10-len(s)}"
004 |        ^
005 | NameError: name 's' is not defined
#

@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | ##########
002 | ###abc####
003 | ###test###
ionic jungle
#

!e

s = 'poop'
f"{s}{'#'*10-len(s)}"
wise cargoBOT
#

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

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 2, in <module>
003 |     f"{s}{'#'*10-len(s)}"
004 |           ~~~~~~^~~~~~~
005 | TypeError: unsupported operand type(s) for -: 'str' and 'int'
vocal basin
#

!e

for s in ["", "abc", "test"]:
    print(((5*"#"+s)*2)[(len(s)+1)//2:][:10])
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | ##########
002 | ###abc####
003 | ###test###
#

@verbal zenith :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | ---text---
002 | --text--
ionic jungle
#
s = 'poop'
f"{s}{'#'*((10-len(s))/2)}"
#

!e

s = 'poop'
f"{s}{'#'*((10-len(s))/2)}"
wise cargoBOT
#

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

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 2, in <module>
003 |     f"{s}{'#'*((10-len(s))/2)}"
004 |           ~~~^^~~~~~~~~~~~~~~
005 | TypeError: can't multiply sequence by non-int of type 'float'
vocal basin
#

where length?

ionic jungle
#

!e

s = 'poop'
f"{s}{'#'*int((10-len(s))/2)}"
wise cargoBOT
#

@ionic jungle :warning: Your 3.12 eval job has completed with return code 0.

[No output]
ionic jungle
#

!e

s = 'poop'
print(f"{s}{'#'*int((10-len(s))/2)}")
wise cargoBOT
#

@ionic jungle :white_check_mark: Your 3.12 eval job has completed with return code 0.

poop###
verbal zenith
#

!e

print(f"{'text':-^10}")
def center_pad(text, pad, length):
  length -= len(text)
  left_length = length // 2
  right_length = left_length + length % 2
  print(pad*left_length + text + pad*right_length)

center_pad("text", "-", 10)
wise cargoBOT
#

@verbal zenith :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | ---text---
002 | ---text---
ionic jungle
#

!e

s = 'poop'
print(f"{'#'*int((10-len(s))/2)}{s}{'#'*int((10-len(s))/2)}")
wise cargoBOT
#

@ionic jungle :white_check_mark: Your 3.12 eval job has completed with return code 0.

###poop###
vocal basin
#

!e

s = "abc"
print(f"{'#'*int((10-len(s))/2)}{s}{'#'*int((10-len(s))/2)}")
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.

###abc###
vocal basin
#

9

#

!e

s = "abc"
print(f"{'#'*int((10-len(s))/2)}{s}{'#'*int((11-len(s))/2)}")
s = "abcd"
print(f"{'#'*int((10-len(s))/2)}{s}{'#'*int((11-len(s))/2)}")
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | ###abc####
002 | ###abcd###
vocal basin
#

that one, though, fails for >10 length

#

cut off instead of padding

ionic jungle
#

!e

s = 'poop'
w = 10
print(f"{'#'*int((w-len(s)+w%2)/2)}{s}{'#'*int((w-len(s))/2)}")
wise cargoBOT
#

@ionic jungle :white_check_mark: Your 3.12 eval job has completed with return code 0.

###poop###
ionic jungle
#

!e

s = 'poops'
w = 10
print(f"{'#'*int((w-len(s)+w%2)/2)}{s}{'#'*int((w-len(s))/2)}")
wise cargoBOT
#

@ionic jungle :white_check_mark: Your 3.12 eval job has completed with return code 0.

##poops##
vocal basin
#

you just need to use w+1 on the right instead of w, I think

ionic jungle
#
s = 'poops'
w = 10
print(f"{'#'*int((w-len(s))/2)}{s}{'#'*int((w+w%2-len(s))/2)}")
#

!e

wise cargoBOT
#
Missing required argument

code

ionic jungle
#

!e

s = 'poops'
w = 10
print(f"{'#'*int((w-len(s))/2)}{s}{'#'*int((w+w%2-len(s))/2)}")
wise cargoBOT
#

@ionic jungle :white_check_mark: Your 3.12 eval job has completed with return code 0.

##poops##
ionic jungle
#
s = 'poops'
w = 10
print(f"{'#'*int((w-len(s))/2)}{s}{'#'*int((w+len(s)%2-len(s))/2)}")
#

!e

s = 'poops'
w = 10
print(f"{'#'*int((w-len(s))/2)}{s}{'#'*int((w+len(s)%2-len(s))/2)}")
wise cargoBOT
#

@ionic jungle :white_check_mark: Your 3.12 eval job has completed with return code 0.

##poops###
vocal basin
#

!e

c = '#'
w = 10
for s in ["", "abc", "test"]:
    print((w-(n:=len(s))>>1)*c+s+c*(w+1-n>>1))
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | ##########
002 | ###abc####
003 | ###test###
vocal basin
#

!e

c = '#'
w = 10
for s in ["", "abc", "test"]:
    print(((n:=w-len(s))>>1)*c+s+c*(n+1>>1))
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | ##########
002 | ###abc####
003 | ###test###
vocal basin
#

!e

print(bin(426))
print(bin(426>>1))
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | 0b110101010
002 | 0b11010101
vocal basin
#

equivalent to //2 but has lower precedence

high mantle
#

@ionic jungle You've pulled me out of what I was doing with your explanation of life as a single python script ๐Ÿ˜… pithink

vocal basin
#

!e

print(10+10//2)
print(10+10>>1)
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | 15
002 | 10
high mantle
#

Wait what ?! Steven Seagul ?! ๐Ÿคฃ I've missed a part

#

@ionic jungle

vocal basin
#

&1 gives the same as %2 (modulo, which is remainder for positive inputs)

#

wth how is Steven Seagal a member of SRZP

#

(fake opposition party in Russia)

#

keyword fake

scarlet halo
# modern yacht how did you make that??

so i used some ascii round box symbols and made a function that takes in a title, and some values in a dictionary consisting of label:command and then rendered it with print statements and used the blessed module for input and colors and terminal width and height information. made a function to space out a string with spaces.

modern yacht
#

show me the code

scarlet halo
#
def spaceout(value,length,space=' '):
    if (len(value) % 2) != 0:
        b = 1
    else:
        b = 0
    return space * ((length - len(value)) // 2) + str(value) + space * ((length - len(value) + b) // 2)

def menuloop(title, options):
    key = term.inkey(0)
    default = term.inkey(0)
    pos = 0
    while key.code != 361:
        if key.code == 258:
            pos += 1
            key = default
        elif key.code == 259:
            pos -= 1
            key = default
        elif key.code == 343 or key == ' ':
            cmd = list(options.values())[pos]
            cmd()
        if key.code == 361:
            break
        pos = pos % len(options.keys())
        keys = list(options.keys())
        vals = list(options.values())
        print(term.clear)
        long = len(max(options.keys(), key = len))
        if len(title) > long:
            long = len(title)
        long += 2

        print("\n" * ((term.height // 2) - (3 + len(options.keys()))))

        print(spaceout(f"โ•ญ{        spaceout(term.bold + title + term.normal,long + len(term.bold) + len(term.normal),'โ”€')          }โ•ฎ",term.width + len(term.bold) + len(term.normal)))

        # print(spaceout(f"โ”‚{ + spaceout(title,long) + term.normal}โ”‚",term.width + len(term.bold) + len(term.normal)))

        for i in range(len(options.keys())):
            if pos == i:
                col = term.black_on_white + term.bold
            else:
                col = term.normal
            print(spaceout(f"โ”‚{col + spaceout(keys[i],long) + term.normal}โ”‚",term.width + len(col) + len(term.normal)))
        print(spaceout(f"โ•ฐ{'โ”€' * long}โ•ฏ",term.width))
        key = term.inkey(1)
        continue
``` you will also need to import Terminal from blessed and make a variable called term pointing to Terminal()
modern yacht
#

example of it's use case

scarlet halo
#

menuloop("Main Menu",{"Start Test":starttest,"Settings":settings, "Exit":exit})

#

planning on adding tabs.

#

maybe inputs

modern yacht
#

pretty nice

ionic jungle
#

print(str(1))

earnest crag
#

String(1)?

ionic jungle
#

str()

#

print(f"{1}")

earnest crag
#

f{1}?

ionic jungle
#

1

modern yacht
ionic jungle
#

!e

print(f"{1}")
wise cargoBOT
#

@ionic jungle :white_check_mark: Your 3.12 eval job has completed with return code 0.

1
ionic jungle
#

!e

print(str(1))
wise cargoBOT
#

@ionic jungle :white_check_mark: Your 3.12 eval job has completed with return code 0.

1
modern yacht
#

Sounds like Grandpa speaking

#

Welcome

#

Never coded a bot before'

high mantle
#

@rapid chasm I have an idea / request ! wow

modern yacht
#

is it hard first of all

#

well i have no idea but would love to learn from you guys on how to create one

#

Wait you are a voice actor or something like that

#

what does that mean. And you sound really different

somber heath
#

@drifting echo ๐Ÿ‘‹

rapid chasm
#
        title=f"1 player is currently in the queue" if len(
            users_queue) == 1 else f'{len(users_queue)} players are currently in the queue',
scarlet halo
#

and settings()

rapid chasm
#
        title=f"{len(users_queue)} player{' is' if len(users_queue) == 1 else 's are'} currently in the queue",`
high mantle
stark river
#
title = f"{len(users_queue)} player(s) in queue"
#

simplified

eager thorn
#
001 | 3 player(s) in queue
002 | User1
003 | User2
004 | User3
#
users_queue = ["User1", "User2", "User3"]
title = f"{len(users_queue)} player(s) in queue"
print(title)
for user in users_queue:
    print(user)
modern yacht
#

how can i avoid this repetition


    @property
    def width(self) -> int:
        """Simple width getter"""
        return self.__width

    @property
    def height(self) -> int:
        """Simple height getter"""
        return self.__height

    @property
    def x(self) -> int:
        """Simple x getter"""
        return self.__x

    @property
    def y(self) -> int:
        """Simple y getter"""
        return self.__y
#

okey

#

anyone mind helping out

rapid chasm
#
    # Get the voice channel
    voice_channel = ctx.guild.get_channel(712072729406472374)

    # Sort users_queue by ready_time
    users_queue_sorted = sorted(users_queue, key=lambda x: x.get("ready_time", datetime.datetime.min))

    # Convert users_queue_sorted to a set for efficient membership tests
    users_queue_set = set(user["member"] for user in users_queue_sorted)

    # Separate users into "Ready" and "Not ready"
    ready_users = []
    not_ready_users = []
    for member in voice_channel.members:
        if member in users_queue_set:
            ready_users.append(member)
        else:
            not_ready_users.append(member)

    # Create strings for "Ready" and "Not ready" users
    ready_string = '\n'.join([f'{member.mention}' for member in ready_users])
    not_ready_string = '\n'.join([f'{member.mention}' for member in not_ready_users])
#
    # Get the voice channel
    voice_channel = ctx.guild.get_channel(712072729406472374)

    # Sort users_queue by ready_time
    users_queue_sorted = sorted(users_queue, key=lambda x: x.get("ready_time", datetime.datetime.min))

    # Separate users into "Ready" and "Not ready"
    ready_users = [member for member in voice_channel.members if member in [user["member"] for user in users_queue_sorted]]
    not_ready_users = [member for member in voice_channel.members if member not in [user["member"] for user in users_queue_sorted]]

    # Create strings for "Ready" and "Not ready" users
    ready_string = '\n'.join([f'{member.mention}' for member in ready_users])
    not_ready_string = '\n'.join([f'{member.mention}' for member in not_ready_users])
#

users_queue = ["User1", "User2", "User3", "User4", "User5", "User6", "User7", "User8", "User9", "User10"]

high mantle
rapid chasm
#
    users_queue = ["User1", "User2", "User3", "User4", "User5", "User6", "User7", "User8", "User9", "User10"]
    voice_channel = ["User10", "User2", "User5", "User44", "User5", "User6", "User75", "User8", "User96", "User10"]

    # Sort users_queue by ready_time
    users_queue_sorted = sorted(users_queue, key=lambda x: x.get("ready_time", datetime.datetime.min))

    # Convert users_queue_sorted to a set for efficient membership tests
    users_queue_set = set(user["member"] for user in users_queue_sorted)

    # Separate users into "Ready" and "Not ready"
    ready_users = []
    not_ready_users = []
    for member in voice_channel.members:
        if member in users_queue_set:
            ready_users.append(member)
        else:
            not_ready_users.append(member)

    # Create strings for "Ready" and "Not ready" users
    ready_string = '\n'.join([f'{member.mention}' for member in ready_users])
    not_ready_string = '\n'.join([f'{member.mention}' for member in not_ready_users])
    
    print(ready_string)
    print(not_ready_string)
#
    users_queue = ["User1", "User2", "User3", "User4", "User5", "User6", "User7", "User8", "User9", "User10"]
    voice_channel = ["User10", "User2", "User5", "User44", "User5", "User6", "User75", "User8", "User96", "User10"]

    # Sort users_queue by ready_time
    users_queue_sorted = sorted(users_queue, key=lambda x: x.get("ready_time", datetime.datetime.min))

    # Separate users into "Ready" and "Not ready"
    ready_users = [member for member in voice_channel.members if member in [user["member"] for user in users_queue_sorted]]
    not_ready_users = [member for member in voice_channel.members if member not in [user["member"] for user in users_queue_sorted]]

    # Create strings for "Ready" and "Not ready" users
    ready_string = '\n'.join([f'{member.mention}' for member in ready_users])
    not_ready_string = '\n'.join([f'{member.mention}' for member in not_ready_users])
    
    print(ready_string)
    print(not_ready_string)
cursive echo
#

!d time.time

wise cargoBOT
#

time.time() โ†’ float```
Return the time in seconds since the [epoch](https://docs.python.org/3/library/time.html#epoch) as a floating point number. The handling of [leap seconds](https://en.wikipedia.org/wiki/Leap_second) is platform dependent. On Windows and most Unix systems, the leap seconds are not counted towards the time in seconds since the [epoch](https://docs.python.org/3/library/time.html#epoch). This is commonly referred to as [Unix time](https://en.wikipedia.org/wiki/Unix_time).

Note that even though the time is always returned as a floating point number, not all systems provide time with a better precision than 1 second. While this function normally returns non-decreasing values, it can return a lower value than a previous call if the system clock has been set back between the two calls.
rapid chasm
#
import datetime

users_queue = ["User1", "User2", "User3", "User4", "User5", "User6", "User7", "User8", "User9", "User10"]
voice_channel = ["User10", "User2", "User5", "User44", "User5", "User6", "User75", "User8", "User96", "User10"]

# Separate users into "Ready" and "Not ready"
ready_users = [member for member in voice_channel if member in users_queue]
not_ready_users = [member for member in voice_channel if member not in users_queue]

print("Ready Users:", ready_users)
print("Not Ready Users:", not_ready_users)
#
import datetime

users_queue = ["User1", "User2", "User3", "User4", "User5", "User6", "User7", "User8", "User9", "User10"]
voice_channel = ["User10", "User2", "User5", "User44", "User5", "User6", "User75", "User8", "User96", "User10"]

# Separate users into "Ready" and "Not ready"
ready_users = []
not_ready_users = []
for member in voice_channel:
    if member in users_queue:
        ready_users.append(member)
    else:
        not_ready_users.append(member)

print("Ready Users:", ready_users)
print("Not Ready Users:", not_ready_users)
high mantle