#off-topic-lounge-text

1 messages · Page 30 of 1

dense thistle
#
def widp(w):
  if w >= 10:
    print("the pen is allready at the max width")
  else:
    w=w+1
    pensize(w)
    print(w)
def widm(w):
  if w <= 1:
    print("the pen is allready at the minimum width")
  else:
    w=w-1
    pensize(w)
    print(w)```
#

@primal bison

timid fjordBOT
#

:incoming_envelope: :ok_hand: applied mute to @dense thistle until 2021-06-11 07:54 (9 minutes and 59 seconds) (reason: newlines rule: sent 115 newlines in 10s).

primal bison
#

!unmute 545278622915624970

timid fjordBOT
#

:incoming_envelope: :ok_hand: pardoned infraction mute for @dense thistle.

primal bison
#

!paste please use a pastebin

timid fjordBOT
#

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

dense thistle
#

TypeError: widp() missing 1 required positional argument: 'w'

#

UnboundLocalError: local variable 'w' referenced before assignment

grim veldt
#

hello, someone could help me on a voice and explain to me how to call class from main and create 20 members?

naive thunder
#

anyone able to help me a sec ?

buoyant kestrel
#

What's up?

naive thunder
#

so im trying to make a timer

#

using a class

#

can i send you my code in private ?

buoyant kestrel
#

It'd probably be better if you tossed it either in here or to our hastebin

#

!code

timid fjordBOT
#

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.

buoyant kestrel
#

!paste

timid fjordBOT
#

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

naive thunder
#
import time

class Timer:
    def __init__(self,time_m,time_s):
        self.time_m = m
        self.time_s = s
        def timing_mechanism(self):
           print("Timer is set for ", m(int) , "and ", s(int), "seconds")

CookingTimer = Timer(time_m,time_s)

Timer(5,2)

#CookingTimer()
#

NameError: name 'time_m' is not defined

#

did i do the constructor fine ?

#

we can jump on voicechat 1 if you're fine w that

buoyant kestrel
#

The issue is the CookingTimer = Timer(time_m, time_s) line. Neither time_m nor time_s have been defined anywhere, so Python doesn't know what value to pass to the class.

Also just a quick thing, the def timing... block needs to be on the same indent line as the def __init__... line

naive thunder
#

oh

#

TypeError: init() missing 2 required positional arguments: 'time_m' and 'time_s'

#
import time

class Timer:
    def __init__(self,time_m,time_s):
        self.time_m = m
        self.time_s = s
    def timing_mechanism(self):
        print("Timer is set for ", m(int) ,"minutes ", "and ", s(int), "seconds")
#

where did i go wrong ?

#

@buoyant kestrel

remote arrow
#

can anyone teach me python

trail isle
trail isle
coral bane
#

!play

fresh wadi
#

Hi,

#

Everyone.

primal bison
#

hey

fresh wadi
#

Yeah

#

I'm here.

#

Mr Bcc.

#

Nice to meet you.

#

Are you a python expert?

graceful elk
fresh wadi
#

Hey, @graceful elk

#

Glad to know you.

graceful elk
#

alr x)

fresh wadi
#

Yeah

#

@graceful elk

#

I'm a software engineer who is familiar with Python and its library

#

@graceful elk and you?

graceful elk
gilded moon
#

if anyone good with pandas , can i call him here ?

desert crane
#

Hey! Can anyone assists? I can do VC and ScreenShare

tropic hedge
#

hi im unable to unmute(np)

#

i have a question

#

whats the power shell u are using is it / git ?

#

@gleaming shadow

#

@hot remnant

#

im a starter

#

@cold lintel help pls

cold lintel
#

Hello @tropic hedge. We're currently in #voice-chat-text-0. You need to have a certain amount of activity in the server before you can un-mute.

tropic hedge
cold lintel
tropic hedge
#

okie thank you whats best for windows

#

thanks for your reply!!!!!!!!!!!!

cold lintel
#

It emulates a Linux/Unix shell in Windows.

#

But that was a long time ago 😅

undone yoke
#
import math
import statistics


f = open("C:\\Users\\burka\\OneDrive\\Desktop\\New folder\\demofile.txt", "r+")
numbers = sorted(list(map(int, f.readlines())))
print(numbers[:8000])

average = statistics.mean(numbers)

print("the average score: " + str(round(average, 2)))
primal bison
undone yoke
#

!e

x = int('5\n')
print(x)
timid fjordBOT
#

@undone yoke :white_check_mark: Your eval job has completed with return code 0.

5
undone yoke
#

lol that worked

#

thanks python

golden kindle
#

hello

primal bison
#

!voiceverify

stray flower
#

why are the text help channels all food related?

gentle matrix
#

!e

hard mesa
#

!e print("Hello")

timid fjordBOT
#
Command Help

!eval [code]
Can also use: e

*Run Python code and get the results.

This command supports multiple lines of code, including code wrapped inside a formatted code
block. Code can be re-evaluated by editing the original message within 10 seconds and
clicking the reaction that subsequently appears.

We've done our best to make this sandboxed, but do let us know if you manage to find an
issue with it!*

hard mesa
#

!e

timid fjordBOT
#
Command Help

!eval [code]
Can also use: e

*Run Python code and get the results.

This command supports multiple lines of code, including code wrapped inside a formatted code
block. Code can be re-evaluated by editing the original message within 10 seconds and
clicking the reaction that subsequently appears.

We've done our best to make this sandboxed, but do let us know if you manage to find an
issue with it!*

hard mesa
#

!e print("")

primal bison
#

hello

wary stag
cosmic dove
#

1923​ The Intoxicating Liquor (Sale to Persons under 18) Act 1923 prohibited the sale or purchase of alcohol to or by any person under the age of 18 years

#

there you go

#

not margaret

livid badge
#

hey guys I have a quick question on regex
do any of you have a sec lol

heady dagger
#

i need a suggestion in detecting pattern

#

just need to disscuss few algorithm

buoyant kestrel
heady dagger
#

if you have any knowledge , may i ask few things , are you down for that

#

i try knocking the mentioned channel , no response

buoyant kestrel
#

Just gotta have patience

#

The topical channels typically have less foot traffic

#

But the folks who frequent there know their stuff

molten pine
#

i cant talk her

keen siren
#

can anyone help me parity and palindrome coding in python

#

in understanding with some examples

#

in live stream

#

?

primal bison
#

Can someone help me install something on kali???thinkmon

static escarp
#

Hi guys, I have a little question. Why my function doesn't return enything ?
I will show you my code

cedar quarry
static escarp
#

Thanks ArynR

cedar quarry
#

Np

worldly fern
#

!voiceverify

royal heart
#

Shazaam!

royal heart
#

anything good happening

thick trail
#

hello

#

I got help

#

your code was right

#

bye

sand gulch
#

ok bye

primal bison
#

can some one help me? With .py to .exe

cyan loom
#

#bot-commands

buoyant kestrel
#

We don't allow asking for paid help

distant arch
#

Can anyone tell me how to fix this error? Pls

hollow osprey
#

@client.group()
async def __bank(ctx):
if ctx.invoked_subcommand is None:
await ctx.send('Invalid sub command passed'
'
')

#

Dude please write and do not say. I need that if I send .bank, he sends me a message from the config, and if I also added a space separated by a space, let's say pay, he would execute def_pay for me.
You understood me?

#

If you have a ready-made solution, write do not tell me, and so I will not understand if you tell me👌

#

sorry

#

have very big problem with internet

sand gulch
hollow osprey
#

what i need for it?

sand gulch
#

biryani was asking

#

about it

hollow osprey
#

oh ok

#

i start that

hollow osprey
hollow osprey
primal bison
#

i wanna ask input("whats ur name:") and then put print i like the name and put whatever was put in the input

#

can anyone help?

vivid oak
random saddle
#

Ayone can help me for this error?

timid fjordBOT
ionic ivy
rustic sable
ionic ivy
#

d=-4.9t^2

rustic sable
hybrid gust
#

Yo

primal bison
#

Can't speak yet, not verified

fathom plank
#

#PyNoob Question lets say I want to create a virtual environment for a project, id like to isolate it from the rest of the system. I have been doing some googling and there is just an overwhelming amount of options. What would be best practice at the moment to use ?

buoyant kestrel
buoyant kestrel
#

!stream 461579135769116672

timid fjordBOT
#

@sick pagoda

✅ @sick pagoda can now stream.

hazy gate
#

get rid of the try except and let the error bubble up perhaps

#

@buoyant kestrel huh, sounds like either my mic is broken or something. there's a bare except there, it's swallowing the error. also, hi! get them to remove the try except

buoyant kestrel
#

Oh that's weird

#

How've you been anyway

hazy gate
#

been good 🙂

#

and i think now it might have been the fact that i didnt have voice verified role. haha

buoyant kestrel
#

@hazy gate Staff are immune

hazy gate
#

hmmm

#

okay right, it was me forgetting that discord could be set to push to talk!

buoyant kestrel
#

HA

#

No worries

primal bison
#

Hello does anybody know what is wrong in my code? If you know please help me.

sick pagoda
primal bison
#

with "?"

sick pagoda
#

what is your output

primal bison
#

wait

#

The output is the same as i wrote

sick pagoda
#

and what input are you giving

sick pagoda
primal bison
sick pagoda
#

can you send the output

primal bison
#

Ok

#

wait

sick pagoda
# primal bison

sad isnt the output ...its the input you giving to the a = input line

primal bison
#

Now, it works

#

Ahhh

#

but that works

sick pagoda
#

@primal bison "if a == ["sad","whatever"]" you cant do checks like this ...it will check if a is same as the list you provided which isnt

#

what you want to do is ..."if a in ["sad","im sad","Im sad"]"

primal bison
#

@sick pagoda Thank you so much

#

Have a nice day

sick pagoda
primal bison
#

Another time THANK YOU A LOT!!!

primal bison
#

Hello is there any "goto" command in python like in windows batch>

#

?

royal heart
#

well that was nice

slate flame
#

does anyone know how to update messageboxes with tkinter?

random saddle
#

Ayone can solve this?

slate flame
#

Can anyone help me with my rock paper scissors game using tkinter?

#

i cant get the game to function at all and been stuck for 2 days now

#
 def UserRock():
         #Initialising variables
        Rounds = 1
        Wins = 0 
        ComputerScore = 0
        ties = 0
        RockPaperScissors = ["rock", "paper", "scissors"]
        ComputerChoice = randint(0,2)
        if ComputerChoice == RockPaperScissors[0]:
            MessageBox['text'] = f"You Choose Rock, Computer chooses {RockPaperScissors}. You Both Tie!\n  Wins:{Wins}\n  Losses: {ComputerScore}\n , Ties:{ties}"
            Rounds += 1
            ties += 1
        elif ComputerChoice == RockPaperScissors[1]:
            MessageBox['text'] = f"You Choose Rock, Computer chooses {RockPaperScissors}. You Lose! \n Wins:{Wins}\n  Losses: {ComputerScore}\n , Ties:{ties}"
            Rounds += 1
            ComputerScore += 1
        elif ComputerChoice == RockPaperScissors[2]:
            MessageBox['text'] = f"You Choose Rock, Computer chooses {RockPaperScissors}. You Win!\n  Wins:{Wins}\n  Losses: {ComputerScore}\n , Ties:{ties}"
            Rounds += 1
            Wins += 1```
#

this is one button for when the player chooses rock but i know this whole subroutine is wrong

sick pagoda
#

@slate flame what you can do is make use of switch case ...and also proper a architechture for what you game does ..you could proper functions

slate flame
#

What do you mean? @sick pagoda . I'm kinda new to tkinter and not very experienced in coding

#

The button doesn't do anything when i put the command to equal that function

sick pagoda
slate flame
#

ill also join the voice chat

sand gulch
#

hello

#

do you need help

#

@slate flame

slate flame
#

yea

#

i cant get my rock, paper scissors game to work using tkinter

#

i cant hear you

sand gulch
#

alr leave it

#

do you get any error

#

@slate flame

slate flame
#

no

#

the button just doesnt work

sand gulch
#

so you have problem in logic right?

#

can you show some code

#

of the button

slate flame
#

i think so

#

my whole code is there

sand gulch
#

you dont use pack and place both together

slate flame
#

what do you mean?

sand gulch
#

you either use pack or place

#
label1 = tk.Label(root,text="Welcome to Rock, Paper, Scissors!", font = Font_tuple1)
label2 = tk.Label(root, text="Do you want to play Rock, Paper Scissors?")
label1.pack()
label2.pack()
#

here you have used pac

#

pack*

slate flame
#

thats for my first window

#

the issue is my second window

#

the buttons just doesnt work and i think its because of the subroutines for the rock, paper and scissors buttons

sand gulch
#

ok wait let me check the logic

slate flame
#

ok

sand gulch
#

these buttons dont work

RockButton = tk.Button(frame1, text = "Rock", width = 10, height = 10, padx = 40, pady = 5, command = UserRock)
PaperButton = tk.Button(frame1, text = "Paper", width = 10, height = 10, padx = 40, pady = 5, command = UserPaper)
ScissorsButton = tk.Button(frame1, text = "Scissors", width = 10, height = 10, padx = 40, pady = 5, command = UserScissors)
#

?

slate flame
#

what's wrong with it?

sand gulch
#

no i am saying which buttons dont work

slate flame
#

all of them

sand gulch
#

do these work?

#

you have a problem with them right?

slate flame
#

i think this is the issue

#
def UserScissors():
        #Initialising variables
        Rounds = 1
        Wins = 0 
        ComputerScore = 0
        ties = 0
        RockPaperScissors = ["rock", "paper", "scissors"]
        ComputerChoice = randint(0,2)
        if ComputerChoice == RockPaperScissors[0]:
            MessageBox['text'] = f"You Choose Rock, Computer chooses {RockPaperScissors}. You Both Tie!\n Wins:{Wins},  Losses: {ComputerScore}\n, Ties:{ties}"
            Rounds += 1
            ties += 1
        elif ComputerChoice == RockPaperScissors[1]:
            MessageBox['text'] = f"You Choose Rock, Computer chooses {RockPaperScissors}. You Lose!\n Wins:{Wins}\n  Losses: {ComputerScore}\n, Ties:{ties}"
            Rounds += 1
            ComputerScore += 1
        elif ComputerChoice == RockPaperScissors[2]:
            MessageBox['text'] = f"You Choose Rock, Computer chooses {RockPaperScissors}. You Win! Wins:{Wins}\n  Losses: {ComputerScore}\n, Ties:{ties}"
            Rounds += 1
            Wins += 1```
#

i dont think this is right

sand gulch
#

okay

slate flame
#

because im trying to display messages after every round

#

i just dont know how i would code for it to do that using tkinter since im really new to it

sand gulch
#

oh okay i get it

#

i am sending some optimized code wait

slate flame
#

ok thanks

slate flame
#

yea

#

it doesnt run

#

messagebox = [tk.Label(RockPaperScissorsWindow, text = f"This is Round {Rounds}", padx = 250, pady = 150, fg = "black")]

#

this is the issue code

#

its saying the 'RockPaperScissorsWindow' is not defined

#

and same with 'Rounds'

slate flame
#

the buttons still doesnt work

#

oh ok

#

nothing works apparently

#

when you click on the button, there's nothing that happens

#

yea

#

no messages appear

#

no errors

#

just the buttons dont work

#

can we go in a private call so i can show my screen?

#

ohhh ok

#

so i use int()

sand gulch
#
ComputerChoice = random.choice(['rock', 'paper', 'scissors'])
slate flame
#

where do i put that code?

sand gulch
#

replace this line

ComputerChoice = randint(0,2)

with that

#

in the whole file

slate flame
#

still nothing

#

no error

#

just buttons do nothing

sand gulch
#

ok wait

slate flame
#

ok

#

also i gotta go soon to have dinner

sand gulch
#

run this and press

#

rock button

#

see if something is sent in the terminal

#

@slate flame did it send something

slate flame
#

nothing is sent to the terminal but nothing works

sand gulch
#

ok then remove the functions from b1 click

slate flame
#

what functions?

#

all the subroutines except for the creation of the window?

sand gulch
#

Userclick functions

#

like userrock

#

userscissor

#

userpaper

slate flame
#

ok i did

#

so we going to do it from scratch?

sand gulch
#

no

#

i am saying your function are not getting called

slate flame
#

oh ok

sand gulch
#

so like remove indentation

#

cause i added a print statement in the function

#

and it didnt send anything

#

like you said

slate flame
#

i gtg now

#

i deleted the whole functions and might do it from scratch again

#

i dont know how to do the functions for the buttons

sand gulch
#

okay but i will send you the code

#

when you come please look at this channel

slate flame
#

ok no problem, thanks for the help

sand gulch
#

and if i will be online i will tell you the explanation

slate flame
#

ok cool

#

see you in like 2 hours

sand gulch
#

okay

slate flame
#

It's coding the buttons to update the messages is the problem and absolutely have no idea, if you do manage to fix it I'll check it asap

hybrid gust
#

can you hear me @primal bison

tender tangle
#

@hybrid gust eh?

sand gulch
#

they said they will be back

tender tangle
#

is this some sort of transcendental communication

#

ah

#

I see

sand gulch
#

and i am optimising some of their code

#

and marko came just to say like hi or smth

tender tangle
#

silent hi

sand gulch
#

ok ok

primal bison
#

I think I have a network issue

sand gulch
#

!paste

timid fjordBOT
#

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

sand gulch
#

@slate flame

#

copy what i have done for scissors to rock and paper

#

i have tested everything on my local machine so it will work fine

slate flame
#

@sand gulch I cant run it rn since I'm still out, but I looked at it on my phone and why is 'window' in the parenthesis of the functions?

sand gulch
#

line number?

slate flame
#

Like in line 58 and 75

sand gulch
#

i passed it as a argument because it would

#

give local variable refrenced before assignment

#

error

#

window = RockPaperScissorWindow

slate flame
#

So you don't have to write 'window = RockPaperScissorsWindow' as it means the same thing?

sand gulch
#

yes

slate flame
#

Oh ok

#

What if I have a second window for example, then what would I put in the parenthesis?

sand gulch
#

you change this line

RockButton = tk.Button(frame1, text = "Rock", width = 10, height = 10, padx = 40, pady = 5, command = functools.partial(UserRock, RockPaperScissorsWindow))
PaperButton = tk.Button(frame1, text = "Paper", width = 10, height = 10, padx = 40, pady = 5, command = functools.partial(UserPaper, RockPaperScissorsWindow))
ScissorsButton = tk.Button(frame1, text = "Scissors", width = 10, height = 10, padx = 40, pady = 5, command = functools.partial(UserScissors, RockPaperScissorsWindow))

to this

RockButton = tk.Button(frame1, text = "Rock", width = 10, height = 10, padx = 40, pady = 5, command = functools.partial(UserRock, Window_name))
PaperButton = tk.Button(frame1, text = "Paper", width = 10, height = 10, padx = 40, pady = 5, command = functools.partial(UserPaper, Window_name))
ScissorsButton = tk.Button(frame1, text = "Scissors", width = 10, height = 10, padx = 40, pady = 5, command = functools.partial(UserScissors, Window_name))
#

if you do this then window will be = Window_name

#

@slate flame

slate flame
#

What's "window_name"?

sand gulch
#

"What if I have a second window" second window

slate flame
#

So can I call that window anything I want?

sand gulch
#

yea

slate flame
#

Oh ok

#

I never used functools.partial before

#

What does that do?

sand gulch
#

!e

import functools
def foo(a, b):
  print(a+b)

bar = functools.partial(foo, 3) # it intialises a as 3
bar(9) # b =9 a =3
timid fjordBOT
#

@sand gulch :white_check_mark: Your eval job has completed with return code 0.

12
sand gulch
#

@slate flame

slate flame
#

Ohh ok

#

Thanks for the help btw

sand gulch
#

welcome

#

if you have any other question ping me

#

i will reply if i will be online

slate flame
#

Ok cool

timid fjordBOT
#

:incoming_envelope: :ok_hand: applied mute to @burnt halo until 2021-07-09 20:12 (9 minutes and 58 seconds) (reason: burst rule: sent 8 messages in 10s).

cloud viper
#

hi

tough lance
#

how can i access the voicechat

edgy shoal
#

hello all, is anyone familiar with Django ?

mellow dock
fathom plank
#

anyone here very knowledgeable about "Pyenv" ?

young sonnet
#

@edgy shoal What would you like to know?

edgy shoal
#

THANK YOU!!!

young sonnet
edgy shoal
# young sonnet Okay. <@!554712630410084352> , You do not have a proper url conf. See the exampl...

I have tried to follow that numerous times: getting errors. also upon adding this info to the app/middleware it tends to break as well INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',

'django.contrib.redirects',

'store',    

]

MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',

'django.contrib.redirects.middleware.RedirectFallbackMiddleware',

]

young sonnet
edgy shoal
#

\urls.py", line 21
path('admin/', admin.site.urls),
^
SyntaxError: invalid syntax

young sonnet
#

it's list object, separate the paths by commas and the last on should not have a comma at the end

edgy shoal
#

I'm almost wondering if i should restart fresh and go with Django=1.9, I might still face the same issue because of the redirect.

young sonnet
#

and it's not a version problem, older versions use different syntax and you might get into more trouble

edgy shoal
#

but now http://127.0.0.1:8000/ is giving me :
Page not found (404)
Request Method: GET
Request URL: http://127.0.0.1:8000/

Using the URLconf defined in bookstore.urls, Django tried these URL patterns, in this order:

store/
admin/

The empty path didn’t match any of these.

night lily
#

@ember orbit Pop down into this voice channel.

young sonnet
night lily
#
p.glob('**/*')```
#

Corey Schafer

#

@ember orbit I'll leave you to your watching. 🙂

edgy shoal
cinder trail
#

I just want to mix Python with Arduino

#

So that i do programming on Python

#

and i can control some sensors

#

through that

young sonnet
restive thorn
#

hey

sullen crown
#

hi

agile fjord
#

ovo very nice screenshare @wide aurora fluwushed

snow grail
sand gulch
#

@silver solar you here?

silver solar
#

hello

#

i'm just chilling

#

oops wrong channel

sand gulch
#

lol

primal bison
#

haha

primal bison
#

yes

#

@hardy lynx im here to help

#

ok then you leave

hardy lynx
#

to help with what

primal bison
#

your in code help 1 so i asumed you needed help

hardy lynx
#

?

#

no

#

I didn't ask for anything bro

primal bison
#

well im sorry if i made you mad, you were in the code help vc so i asumed you needed help as that is the purpose of these channels

#

im banned

#

@lunar skiff im here

#

im vc banned

#

oh um i was just about to leave because the other guy was in here and didnt want heklp

#

and they didnt "ask" for help

#

they were in this channel so i thought they needed help

#

bye

crisp junco
#

?

#

what is mp

#

whats the issue talking here

sullen crown
#

hi

timid fjordBOT
limber owl
#

If anyone could give me tips on how to condense this and make this neater it would be aperciated.

modern marsh
#

oh no - that sounds horrible

stark tusk
#

hi

ornate stone
#

can anyone help me solve 4 queen using pysat gulucose3 ? thanks very much

shadow ivy
#

#bot-commands

austere scarab
#

hi i would like to make a quiz program and i also want to display the players total time to solve it

sturdy pilot
#

hey can someone help me make a discord bot

earnest gyro
#

blah blah blah

west matrix
#

e

timid fjordBOT
#

Hey @short turret!

Uh-oh! It looks like your message got zapped by our spam filter. We currently don't allow .txt attachments, so here are some tips to help you travel safely:

• If you attempted to send a message longer than 2000 characters, try shortening your message to fit within the character limit or use a pasting service (see below)

• If you tried to show someone your code, you can use codeblocks
(run !code-blocks in #bot-commands for more information) or use a pasting service like:

https://paste.pythondiscord.com

hardy surge
# sturdy pilot hey can someone help me make a discord bot

Learn how to code a Discord bot using Python and host it for free in the cloud using Repl.it. Along the way, you will learn to use Repl.it's built-in database and create a Discord bot that uses webhooks to connect with GitHub.

Need help with this tutorial? You can ask questions here: https://forum.freecodecamp.org/

This course was developed by...

▶ Play video
ornate basin
#

.

merry cradle
#

.

modern cape
#

.

north willow
hardy valve
tender hedge
#

@elfin blade Thanks for you help with pymongo, sorry i didn't see the message til now.

fallen sentinel
#

ok ill stop sry

#

i ll just talk here dont want to annoy you guys

#

ok

#

if i make the text to speech

#

i will be back

#

will stop

primal bison
#

Oi pessoal

#

Como vocês estão?

primal bison
timid fjordBOT
#

@slow plank Please don't try to ping @everyone or @here. Your message has been removed. If you believe this was a mistake, please let staff know!

ashen relic
#

vscode vs sublime text, which is better?

lavish edge
#

i prefer pycharm

#

but sublime text3 is better to me than vscode

shadow mauve
#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Movement : MonoBehaviour
{

    Rigidbody rb;
    int numberOfJumps;
    bool isGrounded;
    public LayerMask groundMask;

    // Start is called before the first frame update
    void Start()
    {
        rb = GetComponent<Rigidbody>();
    }

    // Update is called once per frame
    void Update()
    {
        var horiz = Input.GetAxis("Horizontal");
        var vert = Input.GetAxis("Vertical");
        transform.Translate(new Vector3(horiz, 0, vert) * (10f * Time.deltaTime));

        if (Input.GetKeyDown(KeyCode.F) && numberOfJumps < 2)
        {
            rb.velocity = Vector3.up * 5f;
            numberOfJumps++;
        }

        RaycastHit hitpoint;
        if (Physics.Raycast(transform.position, Vector3.down, out hitpoint, 0.5f, groundMask))
        {
            isGrounded = true;
        }
        else
        {
            isGrounded = false;
        }

        if (isGrounded)
        {
            numberOfJumps = 0;
        }
    }
}
wide aurora
#

!stream @shadow mauve

timid fjordBOT
#

✅ @shadow mauve can now stream until <t:1628534725:f>.

wide aurora
#

    void Update()
    {
        //Get input from controls
        float horizontal = Input.GetAxisRaw("Horizontal");
        float vertical = Input.GetAxisRaw("Vertical");
        float speed = 5f;
        
        // Gravity
        if (_characterController.isGrounded)
        {
            _currentJumps = 0;
            _verticalVelocity = -gravity * Time.deltaTime;
        }
        else
        {
            _verticalVelocity -= gravity * Time.deltaTime;
        }
        
        // Jump
        if (Input.GetKeyDown(KeyCode.Space) && (_currentJumps < amountOfJumps))
        {
            _currentJumps++;
            _verticalVelocity = jumpForce;
        }
        
        
        // flat movement - left right forward backwards
        var moveVector = (transform.right * (horizontal * speed) + transform.forward * (vertical * speed));
        
        // Add vertical movement
        moveVector.y = _verticalVelocity;
        
        // Move player
        _characterController.Move(moveVector * Time.deltaTime);
    }
#
    [Range(0, 20)] public float gravity = 14f;
    private float _verticalVelocity;

   [Header("Jumping")]
   [Range(0,50)] public float jumpForce = 10f;
void hawk
#

i cant talk

#

@hallow jasper i cant talk please give me roll

slate flame
#

can someone teach me on how to use the queue functions in python

#

i want to learn it for my music player but im stuck

ember ridge
#

okay thanks

cold lintel
#

Hello @worldly reef

#

I don't have a microphone sorry!

#

I can hear you though.

#

Oh nice

#

Nice, Nedbat is kind of a legend here 😄

#

Erm, sure. I typically don't add people unless I know them personally though sorry.

#

You can ping me if you like 👍 . DMs are off as I'm a mod.

#

Ah right, like a matchmaking service 😄

#

Although there may be a bit of an imbalance of potential mentors and mentees.

#

Yeah, I know what you mean!

#

Ah right

#

👋

half wind
#

@primal bison imy

primal bison
#

i cant talk

#

sry @primal bison

primal bison
#

😄

thorn tulip
#

@primal bison hlo

primal bison
#

Hello

#

Wat?

willow zinc
#

hi i have a q

#

what is code for save something

#

like

#

when i press a my clipboard save hi im parsisor and when i press ctrl and v past that

#

pls help

willow zinc
#

?

#

nobody?

jagged lotus
#

Hello

shadow tusk
#

Hola

grave crater
#

hello

primal bison
#

hii

slim briar
#

print "hello world"

#

thats all i know lol

fair wren
#

ValueError: in user code: /usr/local/lib/python3.7/dist-packages/keras/engine/training.py:830 train_function * return step_function(self, iterator) /usr/local/lib/python3.7/dist-packages/keras/engine/training.py:813 run_step * outputs = model.train_step(data) /usr/local/lib/python3.7/dist-packages/keras/engine/training.py:771 train_step * loss = self.compiled_loss( /usr/local/lib/python3.7/dist-packages/keras/engine/compile_utils.py:201 __call__ * loss_value = loss_obj(y_t, y_p, sample_weight=sw) /usr/local/lib/python3.7/dist-packages/keras/losses.py:142 __call__ * losses = call_fn(y_true, y_pred) /usr/local/lib/python3.7/dist-packages/keras/losses.py:246 call * return ag_fn(y_true, y_pred, **self._fn_kwargs) /usr/local/lib/python3.7/dist-packages/tensorflow/python/util/dispatch.py:206 wrapper ** return target(*args, **kwargs) /usr/local/lib/python3.7/dist-packages/keras/losses.py:1631 categorical_crossentropy y_true, y_pred, from_logits=from_logits) /usr/local/lib/python3.7/dist-packages/tensorflow/python/util/dispatch.py:206 wrapper return target(*args, **kwargs) /usr/local/lib/python3.7/dist-packages/keras/backend.py:4827 categorical_crossentropy target.shape.assert_is_compatible_with(output.shape) /usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/tensor_shape.py:1161 assert_is_compatible_with raise ValueError("Shapes %s and %s are incompatible" % (self, other)) ValueError: Shapes (None, 6) and (None, 4) are incompatible site:stackoverflow.com
I am getting such an error in colab, what is the reason? pls help 🙂

gusty trout
#

can sb help me

#

with this code

sand gulch
#

@tranquil drum

#

here

runic thicket
#

Hlo

#

Can't we have permission to speak

bright hornet
#

👀

primal bison
#

I don't use a terminal as well.

river verge
#

Does anyone know bash or a discord that could get me help with a bash script?

gentle jay
gentle jay
fair horizon
#

j

hollow jacinth
#

@primal bison whys that

primal bison
#

hey

charred totem
#

Anyone who knws c programming?

primal bison
#

hi can someone help me

hardy notch
#

Can someone help me create a histogram via Pandas and seaborn

drifting spruce
#

cool

rare garden
#

hello there

#

yeah

pseudo dew
#

@drifting spruce we have had a pretty long convo about this iirc 😄 haha

rare garden
#

so it is ordered in hashmap according to the hashmap in ascending order?

#

yeah

#

ohhh since hashes for objects arent constant

#

ahh right

pseudo dew
#

my old question

#

is what you asked

rare garden
#

so if i start interpreter again i might get different order for {"chara", "fallin", "eivl"}

pseudo dew
#

yes

#

but int hashes are themselves

rare garden
#

ah right

#

ahh okay yeah
the reason for using only till -5 is?

frozen flame
#

@drifting spruce drag me please in voicechat

pseudo dew
rare garden
#

ahh okay seems right

pseudo dew
#

yeah its -5 to 256

drifting spruce
frozen flame
#

yes

rare garden
#

so uhm hash map of set it pretty similar to what you showed right?
and everytime we add an object it recreates it?

pseudo dew
#

can you tell how hashmaps are useful in coding interviews 👀 , like i have heard a lot , are they used for code optimizations

#

yea

#

yeah

#

👌

#

bubble sort i see

#

O(n^2)

#

i see

cold lintel
#

Hash tables almost seem too good to be true.

pseudo dew
#

yeah

rare garden
#

also sorry to drag to a previous topic but
is {1,2,3,5,4} a possible pseudo order / hashmap ( using the 2/3rd thing)

#

ohhh okay

#

ah okay

#

also i would like to know/read a bit more about hashmaps
they seem quite interesting

#

ah lol but i like to do it more for the fun of it

#

could u link something to read over it 😅

pseudo dew
#

sure

rare garden
#

that would be sooo cool man

hoary cloud
#

!e

print([x for x in list(range(6)) if x % 2 == 0])

timid fjordBOT
#

@hoary cloud :white_check_mark: Your eval job has completed with return code 0.

[0, 2, 4]
hoary cloud
#

sorry ^

rare garden
#

ill try to find out myself too.. thanks!

#

also about that question

#

oreo asked
what would be the most optimal way to sort... like the algorithm

pseudo dew
#

thats what hashmap is for

rare garden
frozen flame
#
filename=pass_gen.py

from string import ascii_lowercase,ascii_uppercase,punctuation
import random
length=int(input("tell me the lenght of password "))

def password_creator(lg):
   
    copy=lg
    numbers=[i for i in range(10)]
    chars=[ascii_lowercase,ascii_uppercase,punctuation,numbers]
    password=''
    


    while copy>0:
        random.shuffle(chars)
        password+=str(random.choice(random.choice(chars)))
        copy-=1
    
    return password
#
from pass_gen import password_creator,length
length



def pass_check(lg):
    pct,upper,lower,number,symbol=0,0,0,0,0
    a=password_creator(lg)
    for i in a:
        if i.islower():
            pct+=1
            lower+=1
        elif i.isupper():
            pct+=1
            upper+=1
        elif i.isdigit():
            pct+=1
            number+=1
        else:
            pct+=1
            symbol+=1
    if lower<1:
        print('password require at least 1 lowercase char')
        print('generating new password...................')
        pass_check(lg)
    if upper<1:
        print('password require at least 1 upercase char')
        print('generating new password.................')
        pass_check(lg)
    if number<1:
        print('password require at least 1 number')
        print('generating new password.....................')
        pass_check(lg)
    if symbol<1:
        print('password require at least 1 special symbol')
        print('generating new password.............')
        pass_check(lg)
    print(f'Your newly created password is {a}')

pass_check(length)


   
rare garden
#

ascii_digits

rare garden
#

i might even wanna try to use the match cases for this.. seems lovely way to try it

#

loop will not break tho @drifting spruce 👀

#

@drifting spruce so just curious continue vs pass... cause we were just taught that it skips the execution.. but well my mind got baffled here 👀

#

ah okay

#

ahh okayy yeah

#

finally got it cleared man thanks a lot

rare garden
#

ahh lol nice a happy weekend

#

make a rep?

#

rep means a reputation.. a slang i read somewhere idr 👀

#

ohh so it chooses different algorithms for different data structures to sort

#

that be cool

#

really nice way to go lol

#

yeah similar

#

i think that its targeted at me xD
anyway yeah i need to go to bed.. its my bed time!
it was a real fun session @drifting spruce if you would have some free time.. i would really love have some guidance on python and life too 😄 ✌️

drifting spruce
#

good night @rare garden

rare garden
#

good night eivl

drifting spruce
#

@frozen flame

rancid cedar
proper creek
#

cannot unmute

acoustic depot
#

hu

gentle jay
sleek brook
#

mint swift
#

can someone help me with prime numbers from a list

#

list=[]
n=int(input())
for i in range(0,n):
ele=int(input())
list.append(ele)
print(list)
x=0
for i in range(2, list[x]):
if (list[x]%i)!=0 and i==list[x]:
print(list[x])
x=x+1
else:
break
x=x+1

#

didn t print anything

left mirage
#

I will talk here if it doesn't bother you

#

I see

#

I will have to go on deafen as mom is sleeping next to md

#

Me

#

@drifting spruce

#

And as a stupid person as I am I forgot my head phones

drifting spruce
#

no worries

left mirage
#

Alright, I will continue to watch the stream

drifting spruce
#

you can also watch at twich. probablty houndres of people streaming this came

left mirage
#

Ye, I prefer you

drifting spruce
#

but im not going to stream more, just to show you a few moments of the game

left mirage
#

I understand

drifting spruce
#

ill stream more this weekend if you want 😄

left mirage
#

Even those were good

left mirage
#

I will try to see more game plays of it

drifting spruce
#

its a great game, loads of fun

#

i just got a house in the game, and ill probably have to spend houndreds of hours decorating it 😄

left mirage
#

Oh haha nice

#

You can play it with more people as well?

#

I mean multi-player

left mirage
#

When you see this, just wanna tell you have a nice day and a great time spending, you an amazing person!

drifting spruce
#
{
    "tab-size": 4,
    "translate_tabs_to_spaces": true,
    "ensure_newline_at_eof_on_save": true,
    "rulers": [72, 79],
    "word_wrap": true,
    "wrap_width": 80,
}
#
{
    "ignored_packages":
    [
        "Vintage",
   ],
    "font_size": 19,
    "rulers": [72, 79],
    "caret_style": "solid",
    "wide_caret": true,
    "highlight_line": true,
    "draw_white_space": "all",
    "indent_guide_options": ["draw_active"],
    "line_padding_top": 0,
    "line_padding_bottom": 0,
    "fold_buttons": false,
    "scroll_past_end": true,
    "shift_tab_unindent": true,
    "tab-size": 4,
    "translate_tabs_to_spaces": true,
    "ensure_newline_at_eof_on_save": true,
    /*"rulers": [72, 79],*/
    "word_wrap": true,
    "wrap_width": 80,
       "theme": "auto",
   "color_scheme": "Packages/Theme - Gravity/Monokai Gravity.sublime-color-scheme",
}

#
   "font_face": "Ubuntu Mono Nerd Font Complete Mono Windows Compatible",
       "font_options":
    [
        "directwrite",
        "subpixel_antialiasing",
        "no_bold",
        "no_italic"
        //"no_antialias"
    ],
#
    "file_exclude_patterns": [
        "*.pyc", 
        "*.pyo", 
        "*.exe", 
        "*.dll", 
        "*.obj",
        "*.o", 
        "*.a", 
        "*.lib", 
        "*.so", 
        "*.dylib", 
        "*.ncb", 
        "*.sdf", 
        "*.suo", 
        "*.pdb", 
        "*.idb", 
        ".DS_Store", 
        "*.class", 
        "*.psd", 
        "*.db", 
        "*.sublime-workspace"
    ],
    "folder_exclude_patterns":[
        ".svn", 
        ".git", 
        ".hg", 
        "CVS",
        "__pycache__"
    ],
stoic canyon
#

When is the get_user function (implemented in django.contrib.auth) called? I am using a custom authentication backend and I keep getting anon users for request.user. I followed this post but it didn't help me: https://stackoverflow.com/a/5377282/11573842

#
class EmailCustomAuthentication(authentication.BasicAuthentication):
    def authenticate(self, request):
        data = json.loads(request.body)
        email = data.get('email')
        password = data.get('password')

        if not email:
            raise exceptions.AuthenticationFailed('No email provided.')
        if not password:
            raise exceptions.AuthenticationFailed('No password provided.')

        try:
            user = User.objects.get(email=email)
        except User.DoesNotExist:
            raise exceptions.AuthenticationFailed(
                "Incorrect email provided. No such user exists for this email.")

        credentials = {'username': email, 'password': password}

        if not user.is_active:
            raise exceptions.AuthenticationFailed(
                'The user account has not been active. Check your mailbox for activation mail & click on the activation url to activate your account.')

        user = authenticate(**credentials)

        if not user:
            raise exceptions.AuthenticationFailed(
                "Incorrect password provided.")

        request.session['user_id'] = user.pk
        return (user, None)

    # https://stackoverflow.com/a/5377282/11573842
    def get_user(request):
        print('get_user called!')
        from django.contrib.auth.models import AnonymousUser
        try:
            user_id = request.session[SESSION_KEY]
            backend_path = request.session[BACKEND_SESSION_KEY]
            backend = load_backend(backend_path)
            user = backend.get_user(user_id) or AnonymousUser()
            print(user, user_id)
        except KeyError:
            user = AnonymousUser()
        return user

I am using session authentication btw... Not JWT. I never get get_user called! when I send a request to the backend

#

The doc string says

Return the user model instance associated with the given request session.
If no user is retrieved, return an instance of `AnonymousUser`.

So do I need to clear the session table in the db to get this to work?

I tried this too:

class MessageViewSet(viewsets.ModelViewSet):
    serializer_class = MessageSerializer
    permission_classes = (permissions.AllowAny,)

    def get_queryset(self):
        from django.contrib.auth import get_user
        user = get_user(self.request)
        print(user)
        queryset = Message.objects.all()
        chat_id = self.request.query_params.get('chat_id')
        if chat_id:
            queryset = Message.objects.filter(chat_room_id=chat_id)
        return queryset

but I still get AnonymousUser in the terminal even though I am sending my requests from postman, which does have the session cookie...

#

Oops the channel is full

drifting spruce
#
{
"target": "run_existing_window_command",
"id": "repl_python_run",
"file": "config/Python/Main.sublime-menu"
}
stoic canyon
shadow ivy
drifting spruce
shadow ivy
elder nest
#

var canvas;
var backgroundImage, bgImg, car1_img, car2_img, track;
var database, gameState;
var form, player, playerCount;
var allPlayers, car1, car2;
var cars = [];

function preload() {
backgroundImage = loadImage("assets/background.png");
car1_img = loadImage("assets/car1.png");
car2_img = loadImage("assets/car2.png");
track = loadImage("assets/track.jpg");
}

function setup() {
canvas = createCanvas(windowWidth, windowHeight);
database = firebase.database();
game = new Game();
game.getState();
game.start();
}

function draw() {
background(backgroundImage);
if (playerCount === 2) {
game.update(1);
}

if (gameState === 1) {
game.play();
}
}

function windowResized() {
resizeCanvas(windowWidth, windowHeight);
}

olive linden
#

@thorn grove are you a secret agent and can i join your agentcie pls

long rapids
#

@green ruin This is the chat channel btw

long rapids
#

I'll hop back .... I'm likely not going to be of any help anymore

green ruin
tall badge
#

hi

#

im having trouble writing a language

#

help?

#

@shut marlin ?

#

@astral sable

#

I cant stream

#

yes

#

stream pycharm

#

write programming language in python

#

how do i stream

shut marlin
#

you cant steam here

tall badge
#

oh.

#

then how

shut marlin
#

then?

tall badge
#

to stream

shut marlin
#

what are you trying to do?

timid fjordBOT
#

Hey @tall badge!

Uh-oh! It looks like your message got zapped by our spam filter. We currently don't allow .txt attachments, so here are some tips to help you travel safely:

• If you attempted to send a message longer than 2000 characters, try shortening your message to fit within the character limit or use a pasting service (see below)

• If you tried to show someone your code, you can use codeblocks
(run !code-blocks in #bot-commands for more information) or use a pasting service like:

https://paste.pythondiscord.com

shut marlin
#

!paste

timid fjordBOT
#

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

tall badge
#

how do i do it

shut marlin
#

paste int this website

tall badge
#

*get

#

how do i get the role

shut marlin
#

oh the admins will give you the role

tall badge
#

rip

shut marlin
#

you need to be trusted here

tall badge
shut marlin
#

are you trying to create your own langugae?

tall badge
#

yes

shut marlin
#

oh

#

thats nice

tall badge
#

so what can I add?

shut marlin
#

what can i add?

tall badge
#

yes

#

what kwds or cmds

#

ok

#

ill try

#

ok

#

sry

#

trying to save space

#

brain||fuck|| sharp

#

ok

#

ty

pearl brook
#

hi

frail rock
#

@client.command(aliases=['b'])
@commands.has_permissions(ban_members = True)
async def ban(ctx,member :discord.Member,*,reason= "No reason provided"):
await member.send("you have been banned from Aurora | Astronomy • Social • Icons, Because:" +reason)
await member.ban(reason = reason)

this is what i have to ban members but i cans figure out how to unban members

primal bison
#

hi guys

scenic lodge
primal bison
#

hello I need a bit help at github

#

would you?

shut marlin
jovial arrow
#

I get this error when trying to use dictionary.get for indices in sql

buoyant kestrel
#

@jovial arrow When you pull an element from hashtags, it's returning a string. Strings don't have a .get method

jovial arrow
#

is there another method to call 'indices' ?

#

it's wrapped like this

#

i need to call (211) and (234) separately

#

from json

buoyant kestrel
#

What're you running the regex on? It looks like a JSON

jovial arrow
#

yes JSON

buoyant kestrel
#

It'd be wiser if you use the json library and load it that way. That'll give you a lot more control

jovial arrow
#

I see encoder and decoder is the way!

#

Thanks bro!

buoyant kestrel
#

Happy to help

primal bison
#

What would u guys suggest? Cause currently I'm using pycharm code but should I buy the all products pack because I want to learn C++ or should I just use Visual Studio Code?

#

Also what advantages do I have using Jetbrains IDE's?

fresh sail
#

@inland basin are you looking for code help?

gritty grove
#

Hi!

#

Its je - ku @cunning maple

#

Naaah men

#

Im not allowed to speak daw

#

ohh i see

#

Im new here

#

yuuuh HAHAHHA

#

can we chat?

#

AHHAHAHAHAHA

#

okay, Whats up man?

#

Hi!! @novel shard

#

HAHAHAHA

#

OHhh!!

#

Ohhh!!!

#

I played CSGO

#

@novel shard

novel shard
#

@gritty grove good to know

gritty grove
#

COVID SITUATION

#

HAHHAHA

#

@cunning maple

primal bison
#

!voiceverify

clever wren
#

!voiceverify

#

!voiceverify

#

Can anyone help me out with pytest fixtures and alembic?

#

Im trying to set up a test database and apply alembic migrations on it while testing

primal bison
#

you need help yes? @unreal gale

humble valley
#

I can't speak

#

😾

#

😩

#

😾

slate flame
#

Can anyone help me with my tkinter music player in vc? i cant get it to work properly

grim pasture
#

What kind of function this got to be?

#

Damn I think just sent this too in voice 0

#

Pardon, but I still don't know how though

sage granite
#

How do I take?

#

wrong chat sry

timid compass
#

Im having a hard time understanding how to retrieve dictionary values to print or return. I've tried a few different methods akin to print(dict_name["Key"]) but Im stumped

gritty wasp
#

hi

#

@timid compass you can search on yt as well

lethal badge
#

hello @night lily :p

#

hello ya'll

#

eh?

#

oh sorry

prime breach
#

:/

primal bison
#

I can't connect my github desktop with web through authorization. Anyone please help

late heath
#

This might be a better fit for another channel btw.

shy phoenix
#

fine

short kindle
#

hello, can you help me: The code has bugs. Can you find them, correct them and pass the tests?
HELP BUGS

def fix_me(my_list):

if len(my_list) % 2:  # imperative code
    new_list = []
    for item in my_list:
        for element in item:
            new_list = new_list.append(element)
else:  # functional code
    new_list = [element for element in my_list for element in item]

return new_list.sort(reverse=True, key=lambda x: -x)

Arguments: [[3, 4], [2, 6]]

Departure:
Error Message: free variable 'item' referenced before assignment in enclosing scope, Error Type: NameError, Stack Trace: ['File "/var/task/879430_9203_fix_me.py", line 15, in lambda_handler \ n return fix_me ([[3 , 4], [2, 6]]) \ n ',' File "/var/task/879430_9203_fix_me.py", line 11, in fix_me \ n new_list = [element for element in my_list for element in item] \ n ',' File "/var/task/879430_9203_fix_me.py", line 11, in <listcomp> \ n new_list = [element for element in my_list for element in item] \ n ']

Expected output:
[6, 4, 3, 2]

primal bison
#

!d os.getcwd

timid fjordBOT
#

os.getcwd()```
Return a string representing the current working directory.
primal bison
#

!d print

timid fjordBOT
#

print(*objects, sep=' ', end='\n', file=sys.stdout, flush=False)```
Print *objects* to the text stream *file*, separated by *sep* and followed by *end*. *sep*, *end*, *file*, and *flush*, if present, must be given as keyword arguments.

All non-keyword arguments are converted to strings like [`str()`](https://docs.python.org/3.10/library/stdtypes.html#str "str") does and written to the stream, separated by *sep* and followed by *end*. Both *sep* and *end* must be strings; they can also be `None`, which means to use the default values. If no *objects* are given, [`print()`](https://docs.python.org/3.10/library/functions.html#print "print") will just write *end*.

The *file* argument must be an object with a `write(string)` method; if it is not present or `None`, [`sys.stdout`](https://docs.python.org/3.10/library/sys.html#sys.stdout "sys.stdout") will be used. Since printed arguments are converted to text strings, [`print()`](https://docs.python.org/3.10/library/functions.html#print "print") cannot be used with binary mode file objects. For these, use `file.write(...)` instead.
opal pivot
#

!d print

timid fjordBOT
#

print(*objects, sep=' ', end='\n', file=sys.stdout, flush=False)```
Print *objects* to the text stream *file*, separated by *sep* and followed by *end*. *sep*, *end*, *file*, and *flush*, if present, must be given as keyword arguments.

All non-keyword arguments are converted to strings like [`str()`](https://docs.python.org/3.10/library/stdtypes.html#str "str") does and written to the stream, separated by *sep* and followed by *end*. Both *sep* and *end* must be strings; they can also be `None`, which means to use the default values. If no *objects* are given, [`print()`](https://docs.python.org/3.10/library/functions.html#print "print") will just write *end*.

The *file* argument must be an object with a `write(string)` method; if it is not present or `None`, [`sys.stdout`](https://docs.python.org/3.10/library/sys.html#sys.stdout "sys.stdout") will be used. Since printed arguments are converted to text strings, [`print()`](https://docs.python.org/3.10/library/functions.html#print "print") cannot be used with binary mode file objects. For these, use `file.write(...)` instead.
tropic prism
#

hi everyone , can someone tell me , how can i split this with keep wihtespaces
my
str

be
like

And i want split it like this -> ['my','str','\n','be','like']

bleak totem
crystal vessel
#

Hlo

primal bison
#

hey i need help

#

!d print

visual sail
#

hlo

viscid inlet
celest cedar
#

Heyya!

#

There's no easy way to learn any language!

#

But there's a way, you can do stuff like hands on practice!

#

Make something in python, work on different frameworks as flask/django web app

#

definitely help you more! : )

scenic sable
#

Hello

#

Can someone help me for finding a code error?

primal bison
# scenic sable

In the given code, the program will check if the given user_num is greater than or equal to 2, if it is then it will print "Num is not two" but in the case where the given input is less than 2, for example: user_num is 1 then it will check if it is greater than 2 or equal to 2 which it is not, So it will print "Num is equal to two" which is incorrect since 1 is not equal to 2. And also in the case where user_num is 2 itself which is equal to 2 it will print the same, thus making the program incorrect.

Correct Code:

user_num = int(input())

if user_num != 2:
  print("Num is not two")
else:
  print("Num is equal to two")

PS: sorry for the late answer

glass mortar
#

watch YT tutorial , get a hang on some websites and practice Python(HackerRank Leetcode Hackerearth Geeksforgeek) and practice daily ...

karmic jackal
#

Do you know a good source for python?

unique otter
buoyant kestrel
#

!resources @karmic jackal We've got a whole bunch of resources on our site. For just starting, we typically recommend "Automate the Boring Stuff" and "A Byte of Python"

timid fjordBOT
#
Resources

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

forest vessel
karmic jackal
unique otter
# karmic jackal Yes

u can learn from

1. YouTube
2. Udemy
3. Freecodecham
4. Cs50 edx
5. W3school
6. Geeksforgeeks
7. automatetheboringstuffwithpython
8. codewar
regal raven
#

automatetheboringstuffwithpython is my fav book

eager leaf
#

any reccomendations about moveis

tender roost
#

hii

#

i need help

#

plz

#

plz

#

plz

#

help me

#

help!

#

@buoyant kestrel

#

plz help me

buoyant kestrel
#

With?

tender roost
#

can u come on another vc channel plz

#

i dont have the permission to speak on this vc

#

@buoyant kestrel

buoyant kestrel
#

You don't in the others either. What do you need

tender roost
#

no i dont

buoyant kestrel
tender roost
#

plz

#

i need it tommorow

#

i am sry

#

and its night here

#

dude can u help me plz!?

#

is there anyone u know?

buoyant kestrel
#

Again

tender roost
#

who knows ardiuno who said that?

half lodge
tender roost
#

okk

buoyant kestrel
#

Back in a sec.

half lodge
tender roost
#

@agile portal hii

#

can u help me

#

in ardiuno

#

ok

#

do u know anybody with info of that

cold lintel
#

Erm, ask your question and someone might know.

tender roost
#

i did but no is responding

#

i need it tomorrow itself

tender roost
proven karma
#

phone = input ("phone:")
numbers= {
"1": "one",
"2": "two",
"3":"three",
"4": "four"
}
output = ""
for ch in phone:
output +=numbers.get(ch)
print (output)

unique otter
pliant dirge
#

hello
I dont understand import code in python
someone pls help

lethal badge
#

@wintry kernel If you need some help you can ask me. i will try to help.

exotic vapor
#

i made

buoyant kestrel
#

Ooo, that's pretty cool

primal bison
#

No , ITS REALLY COOL

timber crag
#

hi there @buoyant kestrel

primal bison
cosmic scroll
#

wait why cant i talk in voice chat

regal raven
#

i need help

primal bison
#

hi

#

i m creating a discord i need help if u want to help me dm me i will be in call

#

pls

tawny terrace
#

is this place for getting help via voice?

slate flame
#

can anyone help me with my tkinter music player? im stuck and im not very experienced

cinder gust
#

anyone knows how to install pandas in a docker using python alpine image?

livid olive
sour drift
cinder gust
peak widget
#

I want to build a chatbot using python .. can someone guide me please

young kindle
peak widget
#

thank you

cinder gust
# cinder gust anyone knows how to install pandas in a docker using python alpine image?

For this problem: it's better don't try to use alpine image with pandas xD
https://pythonspeed.com/articles/alpine-docker-python/

Python⇒Speed

When you’re choosing a base image for your Docker image, Alpine Linux is often recommended. Using Alpine, you’re told, will make your images smaller and speed up your builds. And if you’re using Go that’s reasonable advice. But if you’re using Python, Alpine Linux will quite often: Make your builds much slower. Make your images bigger. Waste you...

timid fjordBOT
primal bison
#

@agile portal I have a quick question

agile portal
#

what is it

primal bison
#

can I tell u speaking

agile portal
#

!voice

timid fjordBOT
#

Voice verification

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

primal bison
#

however is c related

#

c language

#

but it's something like tooling

#

i try to explain

#

i installed ming and visual studio code on pc. Now I would like to compile from visual studio but when I press run with debug I open a json setting on which I don't know what to do

agile portal
#

we can goto a private call if you want

primal bison
#

ok

agile portal
#

will be easier to see with screenshare

cold shuttle
#

Ohh

#

Yeah

burnt aspen
#

hello, i need help with a simple pythone turtle exercise. i need to make a star, any help?

cerulean copper
hollow briar
#

i need help

summer tendon
wary panther
#

`help

primal bison
#

How do I remove duplicates from a list like [3, 7, 10, 8, 18, 3, 10, 27, 7, 8] without using the not in [] or set or dictionary?

haughty galleon
#

any1 know anything about automation with selenium?v

cerulean barn
#

@primal bison is this what you are looking for?

primal bison
#

No, I am not allowed to use list comprehension. I need to do this without using that or set or dict

lilac schooner
#

i don't know if this helps, i didn't really look into corner cases

#
arr=[3, 7, 10, 8, 18, 3, 10, 27, 7, 8] 
i=0
while i<len(arr)-1:
    while arr[i] in arr[i+1:]:
        index=arr[i+1:].index(arr[i])
        del arr[index+i+1]
    i+=1
print(arr)  
tame tangle
haughty galleon
tame tangle
#

What’s the entire error message?

#

@haughty galleon 🥕🔑

haughty galleon
tame tangle
#

Can I see the source code?

raven fog
#

hello

#

i need help

#

i'm trying to make a program that allows you to convert a relative integer using the add in method to 2

turbid oasis
cerulean barn
#
import time

for i in range(100):
	time.sleep(1)
	print(f"■■■■ {i} ■■■■")
cerulean barn
#

At 30-39
The square block only prints one, is there any reason for this ?

primal bison
#

!e

for i in range(100):
  print(f"---- {i} ----")
timid fjordBOT
#

@primal bison :white_check_mark: Your eval job has completed with return code 0.

001 | ---- 0 ----
002 | ---- 1 ----
003 | ---- 2 ----
004 | ---- 3 ----
005 | ---- 4 ----
006 | ---- 5 ----
007 | ---- 6 ----
008 | ---- 7 ----
009 | ---- 8 ----
010 | ---- 9 ----
011 | ---- 10 ----
... (truncated - too many lines)

Full output: https://paste.pythondiscord.com/amakipesuf.txt?noredirect

primal bison
#
Why does that happen? @owengitt
#

I cannot understand why that happens, @cerulean barn

cerulean barn
#

Or could it be from my compiler ?

river umbra
#

Hi, if anyone can help me I am stuck on a homework assignment and my prof is really particular about spaces and parenthesis

#

result_list = []
def dining_hall_menus(ovt_menu, pines_menu):
for x in ovt_menu:
if x not in pines_menu:
difference_1 = set(ovt_menu).difference(set(pines_menu))
for y in pines_menu:
if y not in ovt_menu:
difference_2 = set(pines_menu).difference(set(ovt_menu))
result_list = list(difference_2.union(difference_1))
print(result_list)

#

this is the code I tried to do, but it was wrong

buoyant kestrel
#

@primal bison We don't allow recruitment for paid jobs. We're more than happy to assist people when they get stuck, but we're not a jobs board

cerulean barn
#

#python 3.7.1

##Object oriented python 
class bank:
  value=1000
  star=50*"*"
  def addMoney(self):##Withdraw money function
  
    amount=input("how much do you want to deposite?")
    amount=int(amount)
    self.value+=amount 
    print(f"""
    
{self.star}
    New deposited on your account 
    Amount:  ${amount} 
  Your new account balance is ${self.value}
{self.star}

   """)
  def removeMoney(self):#Remove money function
  
    amount =input ("how much do you want to withdraw? ")
    amount =int(amount )
    if amount>self.value:
      print(f"sorry, You don't have up to ${amount} in your account ")
    else:
      self.value+=amount
      print(f"""
{self.star}
      You just withdraw ${amount} from your account .
    Your new account balance is {self.value}
{self.star}
    """)
  def accountBalance(self):##show account balance function 
  
    print(f"your account balance is: ${self.value}")
transact=bank()
print( f"your account balance is ${transact. value}")
    
print(f"""

{transact.star}
Welcome to WORLD BANK 🏦

What do you want to do?
Type 1 to Deposit
Type 2 to Withdraw
{transact.star}

""")
n=input("")
a=0

while a==0:
 
  n=int(n)
  if n==1:
    transact.addMoney()
  elif n==2:
    transact.removeMoney()
  elif n==3:
    a+=1
  else: 
    print("invalid input, try again")
    
  n=input(f"""

{transact.star}
 is there anything else you want to do?
  1 deposit 
  2 withdraw
  3 leave the bank
{transact.star}
""")
  if n==3:
    a+=1
    

print("have a nice day dear")  
print ("give me a star 🌟")
print("""Learn python and become a pro in less than
2 month. 
copy the link and paste in your browser :
  https://getmimo.com/invite/u02xr5
  """)
  
 #i am not sure why the leave bank has to run two times 
cerulean barn
primal bison
cerulean barn
#

I used the

break```  statement instead of the counter
jolly wolf
#

Hello, tell me how to add a background for a window written in the wxpython library? here is the code:
import wx

class MyFrame(wx.Frame):
def init(self, parent):
supper().init(parent, size=(600, 300))

    panel = wx.Panel(self)
    grid_bag = wx.GridBagSize(10, 10)
    
    text = wx.StaticText(panel, label="Exempla")
    scroll_bar = wx.Gauge(panel, wx.ID_ANY, 100, wx.Point(0, 100), wx.Size(-1, 10), wx.GA_HORIZONTAL)
    
    grid_box.Add(text, pos=(0, 0), flag=wx.TOP, border=10)
    grid_box.Add(scroll_bar, pos=(2, 0), flag=wx.EXPAND | wx.BOTTOM, border=50)
    grid_box.AddGrowableCol(0)
    grid_box.AddGrowableRow(1)
    
    panel.SetSizer(grid_box)

app = wx.App()
frame = MyFrame(None)
frame.Show()
app.MainLoop()

crystal path
#

i feel it shud be O(N!)

#

can anyone explaim

torn walrus
#

are any helpers available @scenic tulips

turbid oasis
#

pyautogui" is not accessedPylance

topaz mist
#

pip install pyautogui

turbid oasis
#

I installed it

agile portal
brave vessel
#

channel

#

is this channel free?

worldly temple
#

nya

vital tide
#

hello

#

@thorny grail

thorny grail
#

hii

frigid nymph
#

Hello, does anyone here speak serbian?

flat grove
#

where do i have to start to have a good base of Python and my objectif is to make a web site that can be hook to API for pushing method that give location and i need Python to resolve my client problem .Where can i go to find a good learning python web base for free.

long marsh
#

Hi everyone, excuse me for this ask but i´m really struggled in this issue
work on a Glue Job ETL with pyspark
I need to loop a column that has xml texts, very veryyy long texts, to struct them un another dataframe
i used collect to encapsule the rows and iterate, but this action took more than 4 min to execute just for one register
other option was to convert to pandas and iterate but, the dataset has 500k registers and it causes problems. Can someone has any advice for this problem?
obs. the library to struct xml texts is xmltree

neon ledge
#

elon musk

timid fjordBOT
#

Hey @primal bison!

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

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

long rapids
#

press the trash can on the terminal pane thing, also make sure it saved the file (try opening it in Notepad to see if it did)

deft bloom
#

@lean hull that sounds familier

craggy vault
#

I have a question how do you write a code where the user puts a number and python takes that number and shuffles it with other number

round jasper
#

Anyone have a thought on how to move a file to s3 on the closing/cleanup of a class?

willow tundra
#

Hi anyone know why my dcf function is not printing anything, `import pandas as pd
import matplotlib.pyplot as plt#imported pyplot to plot graphs
import datetime as dt#date time to read first column of csv file
import numpy as np
from datetime import datetime

df = pd.read_csv('FREY.csv')
df2 = pd.read_csv('SLI.csv')

pd.to_datetime(df["Date"]).dt.strftime("%d%m%Y")#reads the date time objects
pd.to_datetime(df2["Date"]).dt.strftime("%d%m%Y")

df['Date'] = pd.to_datetime(df['Date'])
df2['Date'] = pd.to_datetime(df2['Date'])
x1=(df['Date'] - dt.datetime(1970,1,1)).dt.total_seconds()/86400
x2=(df2['Date'] - dt.datetime(1970,1,1)).dt.total_seconds()/86400 def dcf(x1, x2):
x1_n = len(x1)
x2_n = len(x2)
x1_mean = np.mean(x1)
x2_mean = np.mean(x2)
x1_stdv = np.std(x1)
x2_stdv = np.std(x2)
dcf = np.zeros((x1_n, x2_n))
for i, x1 in enumerate(x1):
for j, x2 in enumerate(x2):
#x2_val=[t+x2[j]]
d = (x1 - x1_mean) * (x2 - x2_mean) / (x1_stdv*x2_stdv)
dcf[i, j] = d
return dcf
print(dcf)`

blazing schooner
#

@brazen crown if you use that language in our server you will be banned

heady mirage
#

damn

sand meteor
#

Write a function:

class Solution { public int solution(int[] A); }

that, given an array A of N integers, returns the smallest positive integer (greater than 0) that does not occur in A.

For example, given A = [1, 3, 6, 4, 1, 2], the function should return 5.

Given A = [1, 2, 3], the function should return 4.

Given A = [−1, −3], the function should return 1.

Write an efficient algorithm for the following assumptions:

N is an integer within the range [1..100,000];
each element of array A is an integer within the range [−1,000,000..1,000,000].

#
// import java.util.*;

// you can write to stdout for debugging purposes, e.g.
// System.out.println("this is a debug message");

class Solution {
    public int solution(int[] A) {
        // write your code in Java SE 8
    }
}
#

what is the solution?

primal bison
#

hello

#

can someone help me?
i am interested in game dev

#

and idk where to start

mint ermine
buoyant kestrel
#

!ban 642455022852112384 Racist language is not allowed

timid fjordBOT
#

:x: User is already permanently banned (#53496).

buoyant kestrel
#

Ninjas

hazy gate
#

🥷 ducky_ninja

primal bison
#

@buoyant kestrel check this https://youtu.be/nc-6G9R2APE

We can now Install Windows 11 or Windows 10 on the Raspberry Pi 4 without using a PC! We can do it all from the Raspberry Pi running a Debian-based OS like Raspberry Pi OS thanks to the all-new WoR Flasher from Botspot This will Word with a Micro SD Card, USB Drive M.2 SSD or a 2.5" SSD and in this video, I show you how to get this up and runnin...

▶ Play video
snow swift
#

yo this my first time using discord.

lucid vale
#

Idfk python I'm just here to shitpost

rough cedar
#

lol

#

anybody can help on displaying overlay text vewrbose for a bot script im running