#voice-chat-text-0

1 messages · Page 49 of 1

daring needle
#

understandeble

#

So is it ok if i ask for help in this channel to?

#

awsome

#

Uhm wel im a total noob when it comes to python

#

And im trying to run a RCON php script that uses python

#

RCON = remote control administration tool to manage dedicated gaming servers

#

haha cool

#

haha

#

So this tool uses an old Python 2.7 to function

#

because the game is CoD4 MW

#

from 2008

#

Now when i run the administration python file i get the following error

#

I googled it and some people say im missing a module?

timber lake
#

You need to install dateutil

daring needle
#

Yeah probably

wind raptor
#

Yeah, I've used fastapi and mainly use Flask

daring needle
#

Right i did that but i dont have pip

#

so i tried to install get-pip

#

T-T

timber lake
#

the problem is that you use a deprecated version

daring needle
#

Yeah but the script doesnt work on higher python versions

#

So when i tried the get-pip it told me the one wasnt working since it was meant for 3.0 it linked me the 2.7 one

#

i downloaded the 2.7 pip installer

#

but then i get the above errors

#

@somber heath i cant even get pip to work T-T

#

oh

#

wait

#

its high res

#

3440x1660

timber lake
#

but that problem looks like a problem from firewall klote

daring needle
timber lake
#

can you verify if the rules in your firewall?

daring needle
#

i have to open ports specificaly

#

github?

#

No

wind raptor
#

Was this for COD?

daring needle
#

cod4x

#

yes

wind raptor
#

Not sure if this works, but it's up to date

lavish rover
#

are we talking call of duty or what

daring needle
#

call of duty baby

daring needle
somber heath
#

@hearty tulip @signal compass 👋

wind raptor
#

Nope. I don't see any docs but there are examples

daring needle
#

wondering if this works for cod4x

#

cause its a specific cod mod version

#

identicle?

#

oh

#

this is what i am trying to run

#

Bigbrother 3

#

it worked in 2020

#

yup xD

#

or windows server 2008

#

Noo

#

i want to be able to do it my self

somber heath
#

@main plover 👋

daring needle
#

This project is NO LONGER actively maintained. It is provided 'as is' in its current state!
If you wish to apply as project maintainer please contact B3 development team by opening a
topic on the B3 forums.

#

x-x

signal compass
daring needle
#

haha

#

wait

#

--trusted-host

#

maybe that command will allow me to install get-pip

#

WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)",)': /simple/pip/

wind raptor
#

Rabbit got me thinking someone may have made a docker container for a cod server

#

@daring needle

whole bear
#

hello

daring needle
#

what is a docker container?

wind raptor
#

It's an isolated environment, kind of like a VM but way faster

daring needle
#

aah

wind raptor
#

It's also much safer for running servers on at home

daring needle
#

it doesnt run a rcon tho

wind raptor
#

even if someone breaks into the container, they cannot touch your computer

daring needle
#

ah dont worry its a seperate server

#

running on a empty ssd

#

if it gets hacked wouldnt matter

#

i have the server running already all i need is an rcon

#

but i think i found the solution for the pip issue

daring needle
#

im reinstalling python

#

haha

#

yeah but im going to need to get pip

#

to get the module

#

you mean this?

#

i found a python2.7 download with pip installer

#

yes

#

it was from their website

#

2.7.18

#

last release was april 2020

#

okj

#

i got pip to work

#

next error x-x

#

pip install python-dateutil --upgrade worked

#

moment of truth

#

hopefully it works :X

#

im so anxious

#

lol

#

been trying to get this to work for a 3 days

#

OMG

#

its working

#

it dint give any errors

#

ok starting the server

#

rip

#

haha thanks with your advice

vague bobcat
#

hey

#

quick question

#

is it possible to use oauth2 to join voice channels

#

and if yes how should look the request

#

i tried over the discord api v8 and than guilds guildid channels channelID userID

whole bear
#

whats up @daring needle

#

I am new here

daring needle
#

hi

whole bear
#

what brings you here?

#

@daring needle

daring needle
#

trying to setup cod4 server that uses a RCON bot running on python

whole bear
#

sounds complicated

#

lol

daring needle
#

It shouldnt be lol

whole bear
#

i am just starting out

daring needle
#

but its old stuff

whole bear
#

I have no idea even how to put up an interactive website yet

daring needle
#

CoD4 = Call of Duty Modern Warfare

whole bear
#

oh

#

nice

#

I dont play video games

daring needle
#

aah

#

yah i dont really play that much either

#

but i wanted to be able to host stuff

whole bear
#

maybe like 10 minutes MAX per day

#

cool

#

so you are programmer?

vocal basin
#

I mixed up ligatures and extreme cases of kerning

like ff
type r and ,
then put cursor between them, it will overlap with r

#

they get combined while remaining separate symbols

#

it's not formally a ligature but it uses the same font functionality

vocal basin
#

I just didn't expect it to be that noticeable

somber heath
#

@flint terrace 👋

flint terrace
#

Hello opall

#

thanks for inviting me

#

How to unmute

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.

flint terrace
#

Hahha I have to spek 50 times hahaha

#

yeahhh

#

I am working with python 😂 though that I would be adding value to the group

#

I am a python developer

#

Wanted to show you some hacks with python

#

Getting someones info using osnit

#

ethical hacking

somber heath
#

@quick nebula 👋

flint terrace
#

I have made some cool games and if u have worked with git I could show you something intresting

#

Sureee

quick nebula
#

what are you guys working on rn?

#

@somber heath

#

LOL

#

thats totally fair

#

well said my man

#

im messing around wiht ethernaut rn

#

kinda cool

#

:/ that sounds tough what field were you in previously./

#

?

#

fair

somber heath
#

!e ```py
def class_decorator_with_parameters(a):
def d(cls):
class C(cls):
def init(self):
print(a)
super().init()
return C
return d

@class_decorator_with_parameters("Apples.")
class MyClass:
def init(self):
print("Native.")

mc = MyClass()```

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | Apples.
002 | Native.
vocal basin
#

class-related decorators usually do a lot of special attribute access

#

__special_attribute__

#

!e

def class_decorator_with_parameters(a):
    def d(cls):
        class C(cls):
            def __init__(self):
                print(a)
                super().__init__()
        return C
    return d

@class_decorator_with_parameters("Apples.")
class MyClass:
    def __init__(self):
        print("Native.")

print(MyClass.__name__)
wise cargoBOT
#

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

C
vocal basin
#

it didn't

#

it created another class

#

you can overwrite MyClass's __new__

#

to make MyClass behave like pathlib.Path does

#

pathlib.Path has custom __new__

#

and it returns one of its two subclasses

#

in the thing I'm writing I almost need to call special methods, namely __enter__/__exit__
I can mess with ExitStack but it will only confuse everyone

#

!d contextlib.ExitStack

wise cargoBOT
#

class contextlib.ExitStack```
A context manager that is designed to make it easy to programmatically combine other context managers and cleanup functions, especially those that are optional or otherwise driven by input data.

For example, a set of files may easily be handled in a single with statement as follows:

```py
with ExitStack() as stack:
    files = [stack.enter_context(open(fname)) for fname in filenames]
    # All opened files will automatically be closed at the end of
    # the with statement, even if attempts to open files later
    # in the list raise an exception
```  The `__enter__()` method returns the [`ExitStack`](https://docs.python.org/3/library/contextlib.html#contextlib.ExitStack "contextlib.ExitStack") instance, and performs no additional operations.
worthy token
#

how dose this bot works?

vocal basin
worthy token
#

just prompting it

vocal basin
vocal basin
#

idk where that index is

worthy token
#

ohh thanks !!

vocal basin
verbal zenith
#

!source

wise cargoBOT
vocal basin
#

!d aiohttp

wise cargoBOT
#

Common data structures used by aiohttp internally...

vocal basin
#

pip-specific ones

worthy token
#

coolll

vocal basin
#

weird

#

this is aiohttp.structures not aiohttp

#

from what I understand

#

JS, C# and Python are most advanced for discord bots from what I know

#

all have async/await

#

Rust may join them

#

because no one writing bots wants to care about callbacks

#

Rust takes a lot of ideas not only C/Python

#

some Haskell stuff is also included

#

Rust is C with better composability

#

all the generic, memory safety, and other things can be derived from that

#

!d pathlib.Path.read_text

wise cargoBOT
#

Path.read_text(encoding=None, errors=None)```
Return the decoded contents of the pointed-to file as a string:

```py
>>> p = Path('my_text_file')
>>> p.write_text('Text file contents')
18
>>> p.read_text()
'Text file contents'
```  The file is opened and then closed. The optional parameters have the same meaning as in [`open()`](https://docs.python.org/3/library/functions.html#open "open").

New in version 3.5.
vocal basin
#

aiohttp is a http library for asyncio

#

it may have auto-threshold

#

if auto-threshold is unchangeable that's very bad

#

there are official docs on api

#

I had to use it to do the non-bot api

#

for web login

#

because it was genuinely better to do that myself instead of trusting a basically non-existent library

#

yes it is

#

they no longer develop it
now there's new team

#

from what I know

#

at least didn't go as Actix web

#

oh, my biggest file currently is exactly 1000 lines

vocal basin
worthy token
#

isn't struct used in C ?

#

oh okay

vocal basin
#

C isn't the first

#

Algol is probably

#

!d struct

wise cargoBOT
#

Source code: Lib/struct.py

This module converts between Python values and C structs represented as Python bytes objects. Compact format strings describe the intended conversions to/from Python values. The module’s functions and objects can be used for two largely distinct applications, data exchange with external sources (files or network connections), or data transfer between the Python application and the C layer.

worthy token
#

not false

vocal basin
#

I may misremember the year though

vocal basin
worthy token
#

!d lambda

wise cargoBOT
#

An anonymous inline function consisting of a single expression which is evaluated when the function is called. The syntax to create a lambda function is lambda [parameters]: expression

vocal basin
# vocal basin 2014

Java 8 was released in March 2014 and introduced lambda expressions as its flagship feature.

worthy token
#

"An anonymous inline function consisting of a single expression which is evaluated when the function is called." what dose it really means

#

anonymous

vocal basin
#

!e

print((lambda x: x ** 2)(5))
wise cargoBOT
#

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

25
worthy token
#

ohh i see

vocal basin
#

lambda itself does not get assigned a name during definition

#

!e

square = lambda x: x ** 2
print(square(5))
wise cargoBOT
#

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

25
vocal basin
#

whereas in JS sometimes this is the preferred way

#
const square = (x) => (x * x);
#

(x) => (x * x) this one is lambda

#
  1. this is used a lot JS
  2. this makes function non-overwriteable
vocal basin
#

ChatGPT is a replicator not a solver

#

most of the actual important programming can't be solved with ChatGPT

#

if you can solve something with ChatGPT, your problem has been already solved by other people

worthy token
#

true

vocal basin
#

id does not solve issues

#

this is literally GPT

#

language model

#

it replicates

#

it does not solve

#

it's created to mimic human writing

#

core part of GPT is responsible to measure how likely it is that a certain text is written by a human

#

@verbal zenith

#

did it produce usage examples?

vocal basin
#

same for tests

#

whereas comments are in most cases just either memes or apologies

vocal basin
warped raft
#

hello @long quiver

#

how are you doing

#

wrking on something or not

#

asking you

#

ok

long quiver
#

No im not working

warped raft
#

i could hear

#

what is that

#

no

#

what did you said
i didn't get it

#

ok

#

java && python

#

i am 14 year old and still learning

#

nice

#

why is that so

#

ok

vocal basin
#

oh no it's spreading

#

minesweeper's happening

#

I don't remember either

#

it's mostly up for your choice
(it doesn't offend me in any way)

#

preferences are hard
(I have some, like, mental health conditions that prevent me from choosing)

vocal basin
#

I'm thinking

vocal basin
#

maybe I didn't understand who said

vocal basin
stray niche
#

Ahhhhh

#

Byee AF

vocal basin
#

bye

fallow light
#

Hello!

#

I can't talk for some reason

#

yeaah

vocal basin
#

step-by-step rewrite is sometimes better than risking a second system syndrome

whole bear
#

or just feed the code into AI and ask it to rewrite

vocal basin
#

the list has been updated

#

it's not Aaron originally
someone just started calling me Aaron for some reason

forest zodiac
vocal basin
#

I've re-counted and it's 2MB of python code with 60K lines
that's roughly 1KB of code and 30 lines a day that survived to now

#

why do we have activities enabled here

#

no one can even join

stray niche
#

Yea

vocal basin
#

youtube watch along is also an activity

#

so streaming in a way

vocal basin
stray niche
#

I seee

vocal basin
#

okay, so now I know all the sources for all the elements of the list

#

Penguinland

sour willow
#

@nova prawn # model/media.py async def load_pictures(user_id: str): query = f""" SELECT * FROM pictures WHERE user_id = {user_id} """ result = run_query(query) ...

#

just add async should work

vocal basin
#

i'd expect there to beawait run_query(...)

#

or await asyncio.to_thread(run_query, ...)

#

GIL makes python more understandable in a lot of cases

#

@nova prawn is your program CPU-heavy?

nova prawn
vocal basin
#

what amount of CPU does it use?

nova prawn
#

2 gb vps

vocal basin
#

is the CPU usage the issue?

#

do you need to alternate between the asks or work on them totally in parallel?

sour willow
#

why would you want to do this?

vocal basin
vocal basin
#
async def example():
    time.sleep(1)
#

this will block

sour willow
#

(as a java developer)

vocal basin
#

these won't block

async def example():
    await asyncio.sleep(1)

async def example():
    await asyncio.to_thread(time.sleep, 1)
vocal basin
sour willow
#

no it doesnt not

#

doesnt C# .Net atleast do threading by default?

vocal basin
somber heath
#

@lapis cloud 👋

sour willow
#

ive heard all this huff from C# .NET being all fast because it does threading by default

vocal basin
vocal basin
sour willow
#

go's concurrency is on a another level.

#

too bad the language sucks

#

i can early get 8ms response times (per 8 cores, 200 req) and my servers wont be on fire

#

max like 30ms

vocal basin
#

go is just weird
"steampunk of programming languages" as Bryan Cantrill put it

sour willow
#

it just sucks

#

your structs first charecter NEEDS TO BE CAPS if you want it to be exported

#

the hours i spent to find this out

vocal basin
sour willow
#

not sure if elixer is good for that

vocal basin
#

Elixir is good for very heavy concurrency requirements like telephony

sour willow
#

i have experience with a lot of languages and i can confidently say i understand nothing

#

weird syntax

vocal basin
#

Elixir uses processes. a lot.

#

like, millions of them at a time is quite usual

sour willow
#

mhm

#

makes sense

zenith radish
vocal basin
sour willow
zenith radish
sour willow
#

srsly?

#

@zenith radish Ieriķu iela 3, Vidzemes priekšpilsēta, Rīga, LV-1084, Latvia?

zenith radish
#

Tilia is a genus of about 30 species of trees or bushes, native throughout most of the temperate Northern Hemisphere. The tree is known as linden for the European species, and basswood for North American species. In Britain and Ireland they are commonly called lime trees, although they are not related to the citrus lime. The genus occurs in Euro...

winged hinge
#

hello

zenith radish
somber heath
#

@rigid trellis @distant dragon 👋

distant dragon
willow light
#

Took care of my brother’s dog while he was at Times Square

vocal basin
#

"only 1%"

#

is there a name for fallacy of saying "only 1% die, so 99% don't need it"?

willow light
#

Yes, It's called "It isn't my concern if it doesn't directly affect me."

distant dragon
#

what are you guys talking about

vocal basin
#

I meant, like, 2-4 word widely recognised name

willow light
#

Invincible Ignorance fallacy is the closest I could find

vocal basin
#

It is not so much a fallacious tactic in argument as it is a refusal to argue in the proper sense of the word.

distant dragon
#

australian? @winged shard

winged shard
somber heath
#

@versed linden 👋

versed linden
#

hi

#

i couldn't speak

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.

vocal basin
#

that's very much wrong and contradictory to iterative development

#

you must not need to store too much in your head while building anything

#

"good at communication"
questionable

winged shard
#

song i made

#

you tell me i cant communicate a concise idea or not

vocal basin
#

concise
Brief, yet including all important information

winged shard
#

bro its not about if shit matches the dictionary

#

its about how you make other people feel

vocal basin
forest zodiac
#

😂

distant dragon
#

now this is getting interesting

#

😭

forest zodiac
#

i've been rejected twice cause i dont have a degree

#

but i have been accepted 10 times

distant dragon
#

then you have to have something to demonstrate your skills

vocal basin
quasi condor
#

Highest salary for the Blender Foundation was 60,000EUR as of 2019

#

lowest was 32,500EUR

zenith radish
quasi condor
vocal basin
#

also OpenSolaris license

distant dragon
#

sure

#

I think @rugged tundra brings up a good point

#

I don't know what this guy is on about

whole bear
#

As

austere linden
hearty scroll
#
cmake_minimum_required(VERSION 3.21)
project(project_name_pls_change)
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
    set(MACOSX TRUE)
endif()


if(MACOSX)
    include_directories(/usr/local/opt/libomp/include)
    include_directories(/usr/local/include)
endif()

add_executable(project_name_pls_change main.cpp)
amber raptor
#

CMAKE? :What year is it?:

hearty scroll
#
cd /project_root
ccmake .
make
hearty scroll
#

create a CMakeLists.txt file, @austere linden in the project root then run the above

hearty scroll
#

but cmake really isnt that bad and its by far better than any other c++ build system

amber raptor
viscid lagoonBOT
#

Fortunately, the charging one has been solved now that we've all standardized on mini-USB. Or is it micro-USB? Shit.

hearty scroll
willow light
hearty scroll
#

iso standard trumps a quasi standard

willow light
hearty scroll
amber raptor
#

iso standard just means you wrote up enough paperwork

hearty scroll
willow light
#

ISO standards are nice and all, but try using them on, say, excel.

Which just emits confused screaming when you show it ISO-8601

#

Standards are great if and only if we can get a critical mass of people to actually use it

hearty scroll
#

dude your workflow is kinda broken

willow light
#

I never said anything about cmake

#

cmake is not a datetime format

hearty scroll
#

but we were talking about cmake :/ and c++

willow light
#

last i checked you were talking about standards, but you do you

whole egret
#

10 kg rise

terse needle
whole egret
terse needle
#

@amber raptor

#

my raytracer is coming along

whole egret
#

i need to make my self busy for a day, what program can i write with basic knowledge of python, i never used classes also, i wanna use them

brave isle
#

A simple card game with a card class where you can fill a Deck (maybe even a deck class) and shuffle. You can then write a simple card game.

willow light
willow light
#

"Do you trust the authors of this file?"

No. Not even remotely.

winged hornet
#

hi

winged hornet
#

I need 50 messages to talk and the voice

#

why???????????????

#

can I spam?

#

🙂

whole egret
#

Delphi pascal

gentle flint
random shard
#

@lunar haven why cant i speak

bleak path
#

I need 50 messages as well. Does this include every chat within the discord or just to voice-chat-text groups?

quasi tulip
#
import random
from Eight_Ball_Answers import EightBallAnswers

int = random.randint(1, 8)

EightBallAnswers()
#
class EightBallAnswers:
    if int == 1:
        print("Yes")
    elif int == 2:
        print("No")
    elif int == 3:
        print("Maybe")
    elif int == 4:
        print("Posiibly")
    elif int == 5:
        print("Possibly Not")
    elif int == 6:
        print("Absolutly")
    elif int == 7:
        print("Aboslutly Not")
    else:
        print("Why would you ask that, you know the answer")
somber heath
#

!e py import random choices = 'Apples', 'Pears', 'Oranges', 'Bananas' choice = random.choice(choices) print(choice)

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.

Bananas
quasi tulip
somber heath
#

!e ```py
from dataclasses import dataclass
@dataclass
class Person:
name: str
age: int

people = [Person('Peter', 20), Person('Sally', 21)]
print(people)```

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.

[Person(name='Peter', age=20), Person(name='Sally', age=21)]
somber heath
#

!e py description = {'apples': 'delicious', 'durians': 'stinky'} result = description['durians'] print(result)

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.

stinky
somber heath
#

@frozen rivet 👋

pallid hazel
#

programmed myself into a corner today,
think of it like i did it blocks, and all the blocks stacked around me but now i have to move data from every block into another room.. gonna take made hours of coding..
so i looked at it different, take all the blocks and just make one huge block with the data im processing then just take out what i need to the next room..

#

which came about of building a gui that accesses sensetive data so i broke it down, to only allow access to each block.. but then the blocks couldnt talk to eachother... its mad crazy security.. think i went a little to far on it with things that really werent security issues, more of what ifs.. that lead to another what if..

pallid hazel
whole bear
lavish rover
lavish rover
wind raptor
worthy token
#

hwy

#

hey*

wind raptor
#

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

@whole bear 👋

vocal basin
#

pure js

vocal basin
#

there are additional parameters but I don't remember how to configure them

vocal basin
lavish rover
#

Ooh those are pretty

#

What algorithm do you use to determine the colour?

somber heath
vocal basin
#

depth is determined by lower-resolution renders

#

if it's an unpaid internship, it should at least provide a valuable experience

worthy token
#

ehhhh I'm Canadian too

vocal basin
#

but it shouldn't be unpaid anyway

#

@wind raptor @somber heath
if you have an hour to spend watching a talk about that/adjacent topic, then you can watch this:
https://youtu.be/VzdVSMRu16g

Once upon a time, an investor proposed a "college replacement" by gathering up 18 year olds in order to give them money in exchange for future earnings. It was not a particularly thought through take, but it spurred this talk, which is a particularly thought through take. And heart-felt. And poignant.

▶ Play video
vocal basin
molten bronze
#

can help me with django

vocal basin
molten bronze
vocal basin
#

'index.html'

somber heath
#

I've heard of online courses that are "free" in exchange for a % of future earnings...and not even neccesarily in the same field.

molten bronze
vocal basin
#
return render(request, 'index.html')
molten bronze
#
from django.http import HttpResponse
from django.shortcuts import render

# Create your views here.
def hello(request):
    return HttpResponse("<h1>Hello World</h1>")

def about(request):
    return HttpResponse("About")

def index(request):
    return render(request, 'index.html')
vocal basin
#

what's the error now?

#

restart the server

#

in full

#

don't hope for auto-reload

vocal basin
molten bronze
vocal basin
#

ctrl+c

#

oh

#

you have a new error

molten bronze
vocal basin
#

it's not the same

#

so, now that the error is actually about TemplateDoesNotExist

molten bronze
vocal basin
#

it does not try to load from your directory

vocal basin
#

that may be important

#

okay

molten bronze
worthy token
vocal basin
molten bronze
#

you want me to put that?

#

in templates

vocal basin
#

already there

molten bronze
#

yes is there

vocal basin
molten bronze
worthy token
#

its beautiful

#

Nova Scotia

molten bronze
#

i will do that

worthy token
#

dacampos i was talking about somthing else

molten bronze
#
BASE_DIR = Path(__file__).resolve().parent.parent
#

i will change by this

vocal basin
#

pathlib is better than os.path in almost every way

molten bronze
#

😒

#

soo what i should put in dirs the whole adress?

vocal basin
#

django can async
flask can't

#

@wind raptor I'd suggest not doing WSGI with Django

#

ASGI is preferred

#

you can't reliably store state in memory in Django anyway

molten bronze
#

founded

#

thanks

#

i dind add the app

#

now is working

#

you see cookie what?

vocal basin
#

(or a single word)

molten bronze
#

for what?

vocal basin
#

cookiecutter is for project templating, from I understand

#

what

#

they both guarantee

molten bronze
#

cookiecutter build de itnerfaz

vocal basin
#

@nova prawn if only it was Microsoft

#

it's Oracle

vocal basin
#

mongo can have schema

#

optionally

#

MongoDB's stance on durability is:
your PostgreSQL isn't durable either

vocal basin
#

"please stop spreading misinformation"

molten bronze
#

i udnerstand that

#

sql for transactions no sql for

#

big data is like json you can have with mongo db reapet data or you should handle very good

vocal basin
molten bronze
#

soo eveyone will use mongodb or why you should use sql isntead of MongoDB

vocal basin
molten bronze
#

😄

vocal basin
#

so, the actual difference is not uniqueness or transactions

#

is more about what methods enforce that

molten bronze
#

with sql you can garantee that data will double duplicity will not exist soo for banks

#

you will sql and transactions

#

but mongodb for big data of other things

molten bronze
#

u.u soo when you dont use NoSQL

#

?

vocal basin
#

depends on the task

#

function becomes a method on __get__

#

in python terms, method is a bound function

#

a result of function.__get__

#

!e

class C:
  def m(self): ...
print(C.m)
print(C().m)
wise cargoBOT
#

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

001 | <function C.m at 0x7fd3785c8680>
002 | <bound method C.m of <__main__.C object at 0x7fd3783cc310>>
vocal basin
#

!e

class C:
  @classmethod
  def m(self): ...
print(C.m)
print(C().m)
wise cargoBOT
#

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

001 | <bound method C.m of <class '__main__.C'>>
002 | <bound method C.m of <class '__main__.C'>>
vocal basin
#

!e

class C:
  @staticmethod
  def m(self): ...
print(C.m)
print(C().m)
wise cargoBOT
#

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

001 | <function C.m at 0x7fb6c6df0680>
002 | <function C.m at 0x7fb6c6df0680>
molten bronze
#

I keep not understanding when to use mongo or postgresql or both u.u

#

sql i understend is more for transactions

vocal basin
#

less flexible

vocal basin
#

"Chuck Norris API"

somber heath
#

@honest field 👋

honest field
#

hiiiiiii. new here

wind raptor
#

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

honest field
#

!voice

vocal basin
#

I'm "quite satisfied" with my API design
object-oriented, inheritance-based
extra-cursed, in other words

honest field
#

i havent met yet the require number of messages 😢

somber heath
#

1 2 3

1 2 3
3 1 2
2 3 1

vocal basin
somber heath
#

1 2 3
1 2 3
1 2 3

vocal basin
#

there is fancy slicing

honest field
#

gonna bounce for now. my supervisor might see me lurking unto something else. hahahaha stay safe guys

vocal basin
vocal basin
#

I got this result

#

how are you solving it right now?

#

it's possible that you can turn it into a vectored form step-by-step

#

from just iteration

#

no

#

element-wise operations or ||broadcasting||

#

what does transpose do?
(answering that will help to find an easier solution)

#

@wind raptor
I can send you my solution if you're not interested in solving it yourself

wind raptor
#

sure

vocal basin
#

!e import numpy

wise cargoBOT
#

@vocal basin :warning: Your 3.11 eval job has completed with return code 0.

[No output]
vocal basin
#

voice server died apparently

#

for some time

#

didn't check whether it changed

somber heath
#

!e py import numpy as np a = np.arange(10).reshape(10, 1) b = np.arange(10).reshape(1, 10) arr = (a + b) % 10 print(arr)

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | [[0 1 2 3 4 5 6 7 8 9]
002 |  [1 2 3 4 5 6 7 8 9 0]
003 |  [2 3 4 5 6 7 8 9 0 1]
004 |  [3 4 5 6 7 8 9 0 1 2]
005 |  [4 5 6 7 8 9 0 1 2 3]
006 |  [5 6 7 8 9 0 1 2 3 4]
007 |  [6 7 8 9 0 1 2 3 4 5]
008 |  [7 8 9 0 1 2 3 4 5 6]
009 |  [8 9 0 1 2 3 4 5 6 7]
010 |  [9 0 1 2 3 4 5 6 7 8]]
vocal basin
#

different result

vocal basin
ornate ore
#

hello

vocal basin
#

@quasi tulip
send the code and the error here

#

without any tokens

quasi tulip
#
# bot.py
import os
from discord import Intents
from discord.ext import commands

import discord
from dotenv import load_dotenv

intents = Intents.default()
intents.message_content = True

load_dotenv()
TOKEN = os.getenv('DISCORD_TOKEN')
GUILD = os.getenv('DISCORD_GUILD')

client = discord.Client(intents=intents)

@client.event
async def on_ready():
    print(f'{client.user} has connected to Discord!')

client.run(TOKEN)
vocal basin
#

getenv has two signatures

#

if you have default as str, it will be get you str

vocal basin
#

os.getenv(key: str, default: T) returns str | T

#

load_dotenv does setenv calls

vocal basin
#

Pylance will be fine with this

vocal basin
vocal basin
#

it will fix it

#

correctly

vocal basin
#

throws an error

#

!d ValueError

wise cargoBOT
#

exception ValueError```
Raised when an operation or function receives an argument that has the right type but an inappropriate value, and the situation is not described by a more precise exception such as [`IndexError`](https://docs.python.org/3/library/exceptions.html#IndexError "IndexError").
vocal basin
#

TOKEN type before if is str | None

#

after if it's guaranteed (as far as Pylance's concerned) to be str

#

Pylance's basic type checking is way stricter than PyCharm's default

#

depends on where you assign to a variable

#

(wait, is it "assign to" or just "assign"?)

quasi tulip
#
# bot.py
import os
from discord import Intents
from discord.ext import commands

import discord
from dotenv import load_dotenv

intents = Intents.default()
intents.message_content = True

load_dotenv()
TOKEN = os.getenv('DISCORD_TOKEN')
if TOKEN is None:
    raise ValueError('token not set')
GUILD = os.getenv('DISCORD_GUILD')

client = discord.Client(intents=intents)

@client.event
async def on_ready():
    for guild in client.guilds:
        if guild.name == GUILD:
            break

    print(
        f'{client.user} is connected to the following guild:\n'
        f'{guild.name}(id: {guild.id})'
    )

client.run(TOKEN)

there is the error on both guild's in the print statement at the bottom

vocal basin
#
    for guild in client.guilds:
        if guild.name == GUILD:
            break
    else:
        return
#

on loops, else is ran when the loop exits without break/return

quasi tulip
#
# bot.py
import os
from discord import Intents
from discord.ext import commands

import discord
from dotenv import load_dotenv

intents = Intents.default()
intents.message_content = True

load_dotenv()
TOKEN = os.getenv('DISCORD_TOKEN')
if TOKEN is None:
    raise ValueError('token not set')
GUILD = os.getenv('DISCORD_GUILD')

client = discord.Client(intents=intents)

@client.event
async def on_ready():
    for guild in client.guilds:
        if guild.name == GUILD:
            break
    else:
        return

    print(
        f'{client.user} is connected to the following guild:\n'
        f'{guild.name}(id: {guild.id})'
    )

members = '\n - '.join([member.name for member in guild.members])
print(f'Guild Members:\n - {members}')

client.run(TOKEN)

it keeps saying guild in guild.members is not defined

vocal basin
#
@client.event
async def on_ready():
    for guild in client.guilds:
        if guild.name == GUILD:
            break
    else:
        return

    print(
        f'{client.user} is connected to the following guild:\n'
        f'{guild.name}(id: {guild.id})'
    )

    members = '\n - '.join([member.name for member in guild.members])
    print(f'Guild Members:\n - {members}')
vocal basin
vocal basin
#

same as intents.message_content = True, there is something for member list

subtle stone
#

im just here to observe as i know nothing.

whole bear
#
#pysimplegui code
#Layout 1
Layout1 = [
  [sg.Text('Welcome to PySimpleGUI!')],
  [sg.Button("Click me")],
  [sg.Image("statistik.png", key="IMG")],
  [sg.Button('Close view')],
]

graph = "bigballs.png"
w = sg.window("statistik", Layout1)

while True:
  event, values = w.read()
  if event == sg.WIN_CLOSED or event == 'Close view':
    break
  elif event == 'Click me':
    if graph == 'big balls.png':
      w['img'].update("big balls2.png")
      graph = 'big balls2.png'
    else:
      if graph == 'big balls2.png':
        w['img'].update('big balls.png')
        graph = 'big balls.png'
      if event == sg.WIN_CLOSED or event == 'Close view':
        break

w.close()```
#

the pngs are not images of testicles

subtle stone
#

so the problem was (sg.Window)?

whole bear
#
while True:
  event, values = w.read()
  if event == sg.WIN_CLOSED or event == 'Close view':
    break
  elif event == 'Switch image':
    if graph == 'big balls.png':
      w['img'].update("big balls2.png")
      graph = 'big balls2.png'
    else:
      if graph == 'big balls2.png':
        w['img'].update('big balls.png')
        graph = 'big balls.png'
      if event == sg.WIN_CLOSED or event == 'Close view':
        break

w.close()
vocal basin
#

making a web API so I can monitor asyncio tasks running in my program

#

currently, on per-method basis

subtle stone
#

is elif a joint of else and if?

vocal basin
whole bear
#

a joint

#

just like i need a joint rn, blaze it mlg style

vocal basin
#
if a:
  ...
elif b:
  ...
else:
  ...
if a:
  ...
else:
  if b:
    ...
  else:
    ...
#

elif serves to reduce nesting

vocal basin
vocal basin
vocal basin
whole bear
#
#pysimplegui code
#Layout 1
Layout1 = [
  [sg.Text('Welcome to PySimpleGUI!')],
  [sg.Button("Switch image")],
  [sg.Image("big balls.png", key="IMG")],
  [sg.Button('Close view')],
]
w = sg.Window("statistik", Layout1)
graph = "bigballs.png"

while True:
  event, values = w.read()
  if event == sg.WIN_CLOSED or event == 'Close view':
    break
  elif event == 'Switch image':
    if graph == 'big balls.png':
      w['img'].update("big balls2.png")
      graph = 'big balls2.png'
    else:
      if graph == 'big balls2.png':
        w['img'].update('big balls.png')
        graph = 'big balls.png'
      if event == sg.WIN_CLOSED or event == 'Close view':
        break

w.close()``` the issue this time is that its not swtiching between images
vocal basin
#

isn't the first if doing the same enough?

whole bear
#

nah

somber heath
#

@worthy token 👋

vocal basin
worthy token
#

hai

whole bear
#

huh?

worthy token
#

I cant talk to you guiz

vocal basin
# whole bear huh?

you already checked event == sg.WIN_CLOSED or event == 'Close view'
in the else clause it's already guaranteed to be False
so the second if event == sg.WIN_CLOSED or event == 'Close view': never works

#

removing it won't change anything

#

because it already does nothing

subtle stone
#

hi id talk but im echoing through someone

whole bear
#

ye thats what i thought. removed it but i still cant change between images

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.

worthy token
#

@somber heath Yes

vocal basin
#

"should know know when to die" is quite applicable to processes/systems

whole bear
vocal basin
#

"play minesweeper
play minesweeper even more"

rugged root
#

I miss sleeping in my bed

#

Already hate the bed I'm sleeping in for house sitting

subtle stone
#

😦 u will poweer through, u got this

vocal basin
# vocal basin "play minesweeper play minesweeper even more"

there is a very weird statistical moment with my ranking
out of all 10 parameters that affect standing, I have ranking by that specific parameter higher than the overall ranking in only 1 or 2 parameters
so I am good at one category and garbage at everything else

subtle stone
#

i'm a negative nancy n this is intense for me man

#

like ...damn

somber heath
#

What would the opposing idiom be for "Negative Nancy"? "Positive Peter"?

subtle stone
#

i guess

somber heath
#

"Optimistic Owen"?

winged hinge
subtle stone
#

just saying id stew that thing if i saw it

vocal basin
#

"don't get irritated trying, just give up"

whole bear
#

if you drive a ford you a "insert ford-specific slur"

vocal basin
#

apparently, I muted someone just in time

subtle stone
#

if it was me , then im offended

whole bear
subtle stone
#

the suspense is unreal

rugged root
#

That horse is my spirit animal

somber heath
rugged root
#

Also, Flynn is the single best male Disney hero

#

Second only to the horse

somber heath
#

I'm not sure I have a formed opinion.

vocal basin
#

had had to use some bash scripts earlier but moved on to solutions that don't require writing a lot of it

wise cargoBOT
#

Hey @robust lichen!

It looks like you tried to attach file type(s) that we do not allow (.sh). We currently allow the following file types: .gif, .jpg, .jpeg, .mov, .mp4, .mpg, .png, .mp3, .wav, .ogg, .webm, .webp, .flac, .m4a, .csv, .json.

Feel free to ask in #community-meta if you think this is a mistake.

vocal basin
#

optionally with clear && at the start

#

use the command that gives it

#

!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 floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.

robust lichen
vocal basin
#

if you need comments in bash scripts, you're either doing it wrong or using obscure functionality xargs-alike
or just "if you need comments, you're doing it wrong" in general

#

I see sed there

#

no awk though

#

awk is great; never used it

#

bash allows writing function, afaik

#

comments don't improve readability

#

there are two types of comments mixed

#

one explains sed
another is useless

#

this is a bad way to describe what code does as it adds/explains nothing

and if it is it will set the variable to 1
vocal basin
vocal basin
#
if there is only one episode, then select it
#

"I can judge code I can't see
I can say it's bad and I'll be right in the median case"

rugged root
#

Yo

#

No mic since I'm still not back in my office

#

I miss it

#

A lot

#

Depends on the day

#

I don't mind my co-workers

#

Yeah, I lucked out

#

I've certainly had shit ones in the past, but I like the folks here

#

Same

#

I think today, I'd rather be gaming

robust lichen
# vocal basin "I can judge code I can't see I can say it's bad and I'll be right in the median...

is this code i wrote bad?

    def search_movies(self):
        try:
            query = input("[+] Enter a show name: ")
            json_data = self.get_json_data(query)
            strings = [
                f'{e["id"]}\t{e["title"]} ({e["type"]})' for e in json_data["results"]
            ]
            output = self.fzf.prompt(strings, "--border -1 --reverse --with-nth 2..")
            [id, name] = output[0].split("\t")
            return id, name
        except IndexError:
            print(f"{warn}No results found")
            sys.exit()

def main():
    movie_client = MovieClient()
    id, name = movie_client.search_movies()
    result = watch_movie(id, name)
    media_link = [f'{p["url"]} {p["quality"]}' for p in result["sources"]]
    subtitles = [f'{z["url"]} {z["lang"]}' for z in result["subtitles"]]
    qualities = [p["quality"] for p in result["sources"]]
    best_quality = choose_best_quality(qualities)

    for link in media_link:
        if best_quality in link:
            link = link.split()[0]
            print("[+] Press Ctrl+C to exit the program")
            result = subprocess.run(
                ["mpv", f"{link}", f"--title={name.split()[0]}"],
                stdout=subprocess.DEVNULL,
                stderr=subprocess.DEVNULL,
            )


if __name__ == "__main__":
    main()

vocal basin
rugged root
#

If you're going to overwrite a built-in, do like id_ instead

#

It's convention

vocal basin
#

formatted_results?

#

if in the original it was "results"

somber heath
#

@hallow oxide

hallow oxide
#

?

vocal basin
#

@winged hinge if it does SystemExit inside on error, it can be considered an ok handling

#

it shouldn't be done this way but anyway

hallow oxide
vocal basin
somber heath
vocal basin
#

@winged hinge main shouldn't return generally

#

shouldn't return a value at least

#

system code return is not a very pythonic way

rugged root
#

Hai Opal

robust lichen
#
def choose_best_quality(qualities):
    ordered_qualities = ["1080", "720", "480", "360", "240", "auto"]

    for quality in ordered_qualities:
        if quality in qualities:
            return quality

    return qualities[0]
rugged root
#

Sounds like me

#

No good points

#

Shots fired

#

@zenith radish Hey bud

vocal basin
#

what was that meme
like "I show people the way to <something> I can't have myself"
that's what the quality function would say

rugged root
#

No mic, still in the business services hall

#
    def search_movies(self):
        try:
            query = input("[+] Enter a show name: ")
            json_data = self.get_json_data(query)
            strings = [
                f'{e["id"]}\t{e["title"]} ({e["type"]})' for e in json_data["results"]
            ]
            output = self.fzf.prompt(strings, "--border -1 --reverse --with-nth 2..")
            [id, name] = output[0].split("\t")
            return id, name
        except IndexError:
            print(f"{warn}No results found")
            sys.exit()

That's going to be an issue, too

#

Since that's pointing to the function id

vocal basin
rugged root
#

Hey Focus

#

Auto is fine

#

I think you'd want to start with low then go to high?

robust lichen
rugged root
#

This is just a guess. That way you're at least sending some content, and as you test their connection you can then go to the bigger one

#

In situ

#

En situ?

#

Whatever

#

@zenith radish Am I close?

vocal basin
#

or like, ordered by how needed would they be; may be some weird order like 1080p, 360p, 720p, 480p, 4K, 1440p

rugged root
#

Gotcha

rugged root
#

144p For the win

#

No I didn't mistype

vocal basin
#

24p

winged hinge
#

1p

vocal basin
#

80x24 for tty or something

rugged root
#

Flight plans

rugged root
#

If that

vocal basin
#

or, like, not Linux but DOS

rugged root
#

There's still planes out there where you still have to load in the flight plans and stuff via floppy disks

winged hinge
rugged root
somber heath
#

Are the disks new?

rugged root
rugged root
#

The only quality drop is from them not being written to

#

Bit rot

vocal basin
winged hinge
rugged root
#

Well they certainly don't use the crank to open and close the window to a plane....

vocal basin
#

Arch on microwave next?

rugged root
#

I use microwave, btw

#

JVM requires some sort of OS to run on

winged hinge
#

I use marijuana, btw

rugged root
#

If memory serves

rugged root
#

Android, I would think, Duke

vocal basin
#

there are architecture specifics even for Java iirc
also may still depend on external programs

sharp urchin
#

yus

sharp urchin
#

yes smart fridges do have an OS

sour willow
#

wassup guys i have a small little question

rugged root
#

Ubuntu as a version specific for IoT -LP
This

vocal basin
sharp urchin
#

"smart"only i guess

rugged root
#

@rugged tundra They just couldn't keep up with Third party support

#

They came too late to the party

sour willow
#

so if you do CORS on a website , my users can still send requests from the developer tools

#

how do i prevent this?

rugged root
#

And they were fighting an uphill battle

sharp urchin
#

a car with chatgpt!!!!!

#

would be awesome

rugged root
#

Pitney-Bowes mail machines use Windows

winged hinge
#

@rugged root can I get permission to share my screen? you can have my word that I am not gonna dissapoint the server.

#

I wanna share my terminal and maybe sometimes nvim/tmux

rugged root
#

!stream 406382478102626314

wise cargoBOT
#

✅ @winged hinge can now stream until <t:1672758303:f>.

winged hinge
#

Or maybe my linux rice

vocal basin
#

has anyone seen Ubuntu Docker image's list of supported architectures?
I failed to identify two of them

winged hinge
#

thanks @rugged root

sour willow
#

whats wrong with dwm

rugged root
#

Again, LP said that a LOT of things use some sort of Windows

sour willow
#

Xmonad on top

rugged root
#

"Ricing" as in trying to make things super like tip top

vocal basin
#

fetch does more or less anything

#

don't open API to people

rugged root
#

You can restrict what commands/requests actually do anything

#

Using tokens and what have you

#

@sour willow

vocal basin
#

userbotting is banned

rugged root
#

Yes

vocal basin
#

but userbotting via applications is fine

winged hinge
sour willow
rugged root
#

Bot and User accounts have different access for Discord, @rugged tundra, for example

vocal basin
rugged root
#

Apps

#

Other folks making apps for the phone

rugged root
#

If other people don't make things for your device, it's dead in the water

#

Yarp

vocal basin
#

Xmonad? I'd rather Maybe monad

#

"linux; that's why there's no sound in space"

rugged root
#

No drivers

#

ChromeOS

#

Sorry

#

Wait

#

What?

#

True

#

I can do a class example after I finish my time sheets

#

One of my favorite things to teach

somber heath
#

@topaz mantle 👋

rugged root
#

@rugged tundra There's GDScript. LP beat me to it

#

GDScript is their built in scripting language

#

@robust lichen Don't be demanding

#

God this is why I miss being able to speak

#

So much more efficient than me trying to keep up via typing

#

I don't know how LX does it

somber heath
#

I did the survey.

rugged root
#

Rate limiting is common

#

And not a bad way of handling excessive amounts of requests

#

BUT you're still getting those

#

Hey Pablo

#

What's up

stray niche
#

Hemlock in the VC!

#

Hiii

winged hinge
#

this is a meme video on linux I made a year back
https://www.youtube.com/watch?v=3ia42UkRUHI

My Last S H I T P O S T

===========x Rant x===========
I love to make videos about linux,cloud,development etc.

If you are not happy single, you wont be happy in a relationship. True happiness comes from using LINUX, not another person. Start using LINUX.
And please Subscribe to my channel. Hit the like button to trigger the youtube algorith...

▶ Play video
rugged root
#

Hey Sammy

#

Can't use my mic, but I missed hearing people

vocal basin
winged hinge
#

Henlo @stray niche

vocal basin
winged hinge
#

Where are you the whole day

stray niche
stray niche
stray niche
vocal basin
winged hinge
rugged root
#

Don't know enough about Django to be of any use, sorry

#

@ripe raptor Sorry bud

#

Also a good movie

#

@zenith radish Been missin' you, bud

zenith radish
#

Miss you too bb ❤️

rugged root
#

@ripe raptor They may not be used as often, but the quality is usually much higher

#

The folks there know their shit. Or the regular help system

#

I just know that I personally don't know jack

#

❤️

sour willow
#

can i stream ?

rugged root
#

For which file - no, bad @zenith radish - exactly, Pablo?

rugged root
#

This is how we have ours

sour willow
rugged root
#

Give me a sec, need to make more progress on my time sheets

vocal basin
#

I know enough Django for my practical use
my practical use being avoiding Django for valid reasons

rugged root
#

Gotcha. Yeah not sure,

#

Yep

winged hinge
#

@rugged root you also have to submit time sheets in your office?

rugged root
#

Yeah. Well it's online now

#

But I still need it done like ASAP

sour willow
#

hemlock can i stream?

winged hinge
#

I really hated when I had to submit in my last company

rugged root
#

I'm already running behind

sour willow
#

ah i though you were with the guy on vc

#

sorry

rugged root
#

All good

#

It's not overly clear

#

The cost of typing

#

God I miss having my office...

#

Currently having to be camped out in one of our conference rooms in the business services hall

#

Can't use the speaky words without disrupting people

#

Good!

#

I figured an example can get you going

#

It irritates me that the Windows calc doesn't have anything for accounting

#

That feels like a no brainer

vocal basin
rugged root
#

It's going to make me use one of our tape calcs here at the office

vocal basin
#

WSGI stuff does not do good with background tasks

#

from what I remember

#

if you call via request then fine-ish

rugged root
#

There's always ASGI