#off-topic-lounge-text
1 messages Β· Page 26 of 1
@ornate thistle

Erm, one of the owners is called Lemon 
Could you use the python debugger?
You can't know in advanced which exceptions can be thrown unfortunately.
Due to the dynamic nature of Python.
Any class/function can raise any exception, essentially.
The best you can do is catch any exception with:
try:
...
except Exception as e:
...
Then inspect the value of e
@warm hedge i want to know if there is a way that i can shuffle a string and have it reshuffled back to the original string
when it is required
you could create your own algorithm
string ----> your algorithm ----> shuffled string
shuffled string ----> reverse what your algorithm did ----> original string```
a simple algorithm could be like switching the first and the last letters
yupp i tried but strings does not support item assignment this what i tried
what do you mean by item assignment
like
wai
t
password = input(..)
for x in range(len(password)):
password[x], password[x+1] = password[x+1], password[x]
i tried this
and it says strings does not support item assignment
string are immutable, you cannot change them unless you have a new variable
use lists instead
convert your string into a list
π
@keen sundial
basically
autoclicker
and i dont know how to turn it off
this is the code that i used
@ivory kernel
but it doesnt turn off
yea
yea sure
hi
yeah i can't no 50 msg yet
what u guys up to
i wanna talk π
haha
i m writing a crossroad python project
crossword *
thanks are you experienced with python?
sorry didnt quite catch that
what did u say?
Ohhh
what channel? help-me?
How are you doing?
Good, how are you?
Good also π
I was actually trying to ask if there is anyone who has experience with web scraping APIs π
I need it for a school project
sorry that's not me π im pretty new to python
oh same here hahaha
but maybe one of the helpers can help in the help-channels i tried sending mine there
Yeah will try that one out, thank you and have a good evening / day π
you too π
Can anyone help with some code I have for linear regression?
I know nothing about linear regression, sorry
\βοΈ
could someone help with installing pygame?
@primal bison what do u need help with?
probably python
@primal bison there are a lot of online resources
u can get started with anyone of those
just install python on you machine and you should be good to go with the built in IDLE
so now start learning it either from youtube or from online docs
i prefer to learn it through youtube
Nope you have a lot to cover
first you need to master all the basics and then do some programs on your own based on them
and then move to upper level stuff
also try getting a text editor like vscode
i dare to use vim
@graceful elk yea vim is not at all beginner friendly and takes a lot of time to get used to
true lol
but its productive if u know how to use it
nah, i prefer sublime
64 bit
windows 8.1
@primal bison
yep
laptop
yes, but actually no
oh, what grade ?
same
damn so many people in vc rn
@kindred kindle
?
Thank you very much kind sir
pygame's input system is fucking pathetic
do any of you guys make simple game bots with python?
pygame~~'s input system~~ is fucking pathetic
Try binding it with ur keyboard
@burnt quail 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!
py -m ensurepip @rain loom
py -m pip install <module here>
Rufus is a small application that creates bootable USB drives, which can then be used to install or run Microsoft Windows, Linux or DOS. In just a few minutes, and with very few clicks, Rufus can help you run a new Operating System on your computer...
!tvban 435582181633425410 1w As I said previously, spamming to get verified will not get you the verified role. As a result, I am extending the period that by 1 week. I do hope you'll participate in the server in a constructive manner.
:x: According to my records, this user already has a voice_ban infraction. See infraction #22238.
Oh well fair enough
hi
hai hai
myself
You do realize that you now have to wait 2 weeks until you can voice verify
i see
Because of said spamming
Yes
jeez
π
As does the message in #voice-verification
If it were that easy to work around it do you really think we'd bother implementing it?
i see
i was inactive for a long time
but now i dont have classes anymore so i can stay here
but now i cant
You don't have to be talking in VC in order to enjoy the server
i know
lol
ohh
u use linux
?
???
@buoyant kestrel can you help me out with something
?
im running kde
and i need something to make the focused window have a border
do you know how to do that?
you can speak in voice
They should be able to help you
py -m pyuic5
py -m pip install <module name>
py -m pip list
py -m pip install pyqt5-tools~=5.15
py -m pip install -U pyqt5-tools~=5.15
Failed to delete a partition on a USB flash drive in Windows 10 due to 'diskpart cannot delete partition on removable media' error? Instead of diskpart utility, you can try EaseUS easy partition tool to delete a whole partition off from USB drive or combine any two partitions into one without much effort.
%appdata%
py -c "import os, sys; print(os.path.dirname(sys.executable))"
py -m pyuic5
#user-interfaces @rain loom
bye @buoyant kestrel
anyone here?
@queen hatch which os ?
Archlinux
hai
@primal bison lol
Hi
In the Django admin section.
When I try to submit a form.
Ok.
I thought that's where I was posting, sorry.
HelloΔ
damn no one have used this channel in 2 days
;-;
dunder getattr?
!e ```py
print(any([None, 12, 3]))
@carmine current :white_check_mark: Your eval job has completed with return code 0.
True
If you're going to be doing that, do this instead: https://docs.python.org/3/library/operator.html#operator.attrgetter
!e ```py
def myproperty(func):
func._property_value = None
def wrapper(self, *args, **kwargs):
if not (func._property_value is None):
print("cached")
return func._property_value
val = func(self, *args, **kwargs)
func._property_value = val
if val is None:
self.unload()
return val
return property(wrapper)
class A():
@myproperty
def a(self):
return "a"
def unload(self):
print("unloaded")
a = A()
a.a
a.a
a.a
@carmine current :white_check_mark: Your eval job has completed with return code 0.
001 | cached
002 | cached
o/
o/
o/
o/
Yo
how can i get the permissions to general voice chat?
@shadow garnet 50 msgs
3 sessions of 10 min each in the general voice channel
and u need to be a member for at least 3 days
then go to the #voice-verify channel and type !voiceverify
yo
hai
@prime jay You can pop down here, if you like. π
check this for me please
To what purpose?
you wanna remove the tags?
this will become bold
Hi guys, what happens is that I am trying to get the user to enter a list of numbers and that the result of this is when the user puts '#', at this moment as I have the code when entering the data it works for me and it adds me (city, duration and price)
but it is having an error in the dialed number since it only prints the first number entered by the user
could you help me with this
gosh
@drifting orbit damn, that quality though
i need help downloading modules in cmd prompt
pip install modulename
Failed to voice verify.
Which one?
Right now
so basically i trying to create a billing form in pyqt5
where im supposed to add all the numbers present in a column
and print it as a total in a label
how am i supposed to do this in pyqt5
can someone pls help me with this
its really urgent
df = pd.read_csv(io.StringIO(uploded['googleplaystore.xlsx'].decode('utf-8')))
i am gettin a utf 8 codec error
@subtle plume Why are you using io.StringIO and .decode() for reading the CSV?
well i saw it on a website and i am not much into coding so i dont know ....
i just copied this code line
@subtle plume Well there probably is a reason for it. Can you manually export the "googleplaystore.xlsx" to a csv file?
Then just read the data in by:
df = pd.read_csv('file.csv')
actually i tried it but the thing is i am doing this in google colab so i was not able to do it the way you mentioned above
if you could please guid me on how i can manually convert it into a csv file..
@subtle plume If you can download the .xlsx and open it on Excel if you are on winsows and save it as a .csv file.
@subtle plume I am pretty sure there is a read_excel function as well.
Ok thanks
What's Up Everybidy
hey'
Is this a Pandas course?
Yup
It's not a library I've used, before, I'm afraid. Have you talked to the #data-science-and-ml people?
That or you can look in #βο½how-to-get-help and grab a help channel.
What, specifically are you needing help with, the working with Pandas side of things, or more the math of it all?
@candid ravine For if you haven't yet seen these.
Corey Schafer's tutorials are worth their weight in gold...if they had weight.
Yes i watch a lot of videos but still have problems in coding
Which they don't, but we can use our imagination.
@candid ravine How new are you to Python?
Just the principles' course
Would you like me to explain any specific Python concepts?
My problem just with pandas
Do you know anyone who can help me with this homework?
I don't want to repetitionπ
!rule 5
5. Do not provide or request help on projects that may break laws, breach terms of services, be considered malicious or inappropriate. Do not help with ongoing exams. Do not provide or request solutions for graded assignments, although general guidance is okay.
just an fyi
@amber pike We can help, just not give the answers
ik
all good
@candid ravine As above, I would maybe poke your head into the data-science channel or grab a help channel, though I would recommend going through the Corey Schafer video series I linked. If that doesn't suit, there are others which you may find easier to follow. I would also suggest reading the Pandas documentation, itself.
@night lily thanks for your time π
@candid ravine I'm sorry I couldn't be of more direct assistance. π
It's okay. Thank you again @night lily
Hello
The rules and guidelines that apply to this community can be found on our rules page. We expect all members of the community to have read and understood these.
!rule 1
1. Follow the Discord Community Guidelines and Terms Of Service.
yessir
!rule 2
2. Follow the Python Discord Code of Conduct.
!rule 3
!rule 100
:x: Invalid rule indices: 100
@subtle violet please use #bot-commands
@subtle violet If you're going to be using a lot of commands- damn it laund
Too damn fast
hehe
my bad
No worries!
@vestal pagoda
@bot.command()
@commands.has_role(267628507062992896)
async def ping(ctx):
await ctx.send("pong")
hii
weight = int(input("Enter your Weight: "))
mass_type = input("(L)bs or (K)g")
if mass_type == 'L':
print(weight)
elif mass_type == 'l':
print(weight)
else:
print(weight * 0.453592)
^
i was writing this
adn it works fine but it seems redundant
weight = int(input("Enter your Weight: "))
mass_type = input("(L)bs or (K)g")
if mass_type == 'L' or 'l':
print(weight)
else:
print(weight * 0.453592)
then when I wrote this l or L entries would work as they just re entered the weight
but the else did not seem to work is there a reason why a
or in an if statment will give me issues
ok sorry
does my question make sense?
i asked above
ooooh i see
is there a way to combine?
insteed of spliting
what are you looking for i can possiblyhelp
search it to help you
ok
one second
if mass_type in ('l', 'L'):
I am testing this
ok
why change int to float again
oooh
i see that makes sense
makes sense
ok
so basicly i should
-
if for l or L
-
elif for K or k
-
else this try agian this is not valid input
would those 3 options in the if statmnet make sense?
thank you
def my_input(text=''):
result = ''
while result not in list('kKlL'):
result = input(text)
return result```
wow thats complex
i guess thats proper python
ok that makes sense
any tips on learning while loops?
^
this is my final question for you
while True:
pass #I will run forever, because of the above true.```
while False:
pass #I will never run```
while input() != 'exit':
pass```
yes
i see
** !=**
^
this means if it is not this then it is true correct?
do I ever write anything in front of the pass?
ill look into this more thank you very much for all the help
your time means a lot ot me
!e
print(i)```
@night lily :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
i see
well thakn you again
where should I look
to learn more about python
https://www.youtube.com/watch?v=_uQrJ0TkZlc&t=4585s
^
I was watching this
Python tutorial - Python for beginners
π Learn Python programming for a career in machine learning, data science & web development.
π₯ Want to master Python? Get my Python mastery course: http://bit.ly/35BLHHP
π Subscribe for more Python tutorials like this: https://goo.gl/6PYaGF
π Watch the 2020 edition: https://youtu.be/kqtD5dpn9C8
π Get My ...
Corey Schafer, sentdex
python.org, documentation page, downloadable documentation in the upper left, pdfs in zip, library.pdf <--- Python bible.
!resources
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
s
:x: There was an error adding the infraction: status 400.
:incoming_envelope: :ok_hand: applied mute to @spark belfry until 2020-12-13 14:29 (9 minutes and 58 seconds) (reason: burst rule: sent 9 messages in 10s).
!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!*
How would I show difference between 5 and the lucky number (assign it to the DIFF variable) and display the following output correctly. I seem to always have invalid syntax coming up.
if I put : this is what shows up
you dont need the indents for the if blocks
remove the indent after the luckynumber input
also, using fstrings for the final print() statement will be good
!t fstrings
In Python, there are several ways to do string interpolation, including using %s's and by using the + operator to concatenate strings together. However, because some of these methods offer poor readability and require typecasting to prevent errors, you should for the most part be using a feature called format strings.
In Python 3.6 or later, we can use f-strings like this:
snake = "Pythons"
print(f"{snake} are some of the largest snakes in the world")
In earlier versions of Python or in projects where backwards compatibility is very important, use str.format() like this:
snake = "Pythons"
# With str.format() you can either use indexes
print("{0} are some of the largest snakes in the world".format(snake))
# Or keyword arguments
print("{family} are some of the largest snakes in the world".format(family=snake))
@solemn comet
@verbal whale Per Rule 6, your invite link has been removed. If you believe this was a mistake, please let staff know!
Our server rules can be found here: https://pythondiscord.com/pages/rules
!rule 6
6. No spamming or unapproved advertising, including requests for paid work. Open-source projects can be shared with others in #python-general and code reviews can be asked for in a help channel.
just checking
hi can any one help me
pls where did you guys learn python
hi, how calculate the derivative of a function in python ?
hi
from youtube and random websites
hai everyone
i got this question in code challenge event i have one solution for this question
but i need optimize solution for this question can any help me in this please
Question
Asha and Amar are playing SpaceKings a video game. It is a two-player game where the second player is the helper. Asha needs your help maximizing her gold while playing her favorite game. Both are facing N aliens. Asha and Amar are both at a single location and the aliens are lined up in front of them. Asha and Amar take turns shooting the aliens, and she goes first. During her turn, Asha may choose any alien to shoot at (this means Asha may choose to skip a turn). During his turn, Amar always shoots the alien closest to him to help Asha maximize her gold. Asha and Amar can not shoot dead aliens.
If Asha shoots at an alien, its hit points are reduced by P. If Amar shoots at an alien, its hit points are reduced by Q. If an alienβs hit points go below 1, it is killed. The ith alien starts with Hi hit points. Asha is awarded Gi gold if her shot kills the ith alien, but none if Amarβs shot kills it. What is the maximum amount of gold Asha can obtain?
Input:
Each case begins with one line containing three space-separated integers representing P, Q and N. N lines then follow, with the ith line containing two space-separated integers representing Hi and Gi. The aliens are given in the order of their distance from Asha and Amar. In other words, Amar will shoot at the ith alien only if all aliens < i are dead.
Output - The maximum amount of gold that Asha can get
Input
20 60 3
80 100
80 200
120 300
Output - 500
Cool @onyx wyvern
my gying grandpa who was in the war taught me a website that told me another site
dying
Hello everyone. I'm still pretty new to python. I know the basics a little bit. Do you guys recommend to just make projects and google the errors or purchase an online course?
!resources I wouldn't suggest purchasing courses.
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
We've got tons of helpful resources on our site
thereis a nice book
it's free
it's called think python
There's also Automate the Boring Stuff and A Byte of Python that're all solid
Think Python is also pretty good, yeah
okay thank you both π
it was suggested by my prof at the 1st year of applied computer science and aritificial intelligence
at La Sapienza
hello
hello
hi
hello, what's up? still coding in christmas? π
merry christmas
merry christmas !
@knotty vector are you facing any issues?
yes




hello
yep i do
how is it at the beginning, what people did and what helped to learn python. do i have to watch projects? do i have to code by myself? bcs sometimes i wanna code soemthing but if i dont know how to keep going i stuck
im here for a week
how to know which one to use ( a function, for loop, while loop) ? bcs you have to imagen the process in the head
i know but only basic, i know how to write simple fucntions
I think the resources page could help you out if you want to learn more about the language honestly. It has resources for learning both advanced and basic python.
!resources
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
thank you very much
yes i do
i work for a logistik company in IT, im support for programs what we use. but some programs has an option to use python code. thats for example to get a certian information from a database and print it in another program
for example we have many cars, small and trucks
and we have a py script what does - when a car is too late on a destinantion, it has to generate an email and send to a company
for example the car has to be at a comapny at 5am and it has a dalay 1-2 hours
it has to genarete an email and send the info to a comapny to inform them
how it works, all cars have a navigation. and all info will be saved in mongo DB, that means with py script i have to get the info when the car has to be there in the plan + comapre with the real time what the navigation says and if the delay is more than 30 min it has to send an email but if not then nothing. its an exaple . but i think for those things i have to me advance with python?
whats hard i have to make a paln to know the whole process , what i need and what i dont need
Depends on the nature of the projects you're working with, and what the company demands you to do with python scripts too. Not everyone needs to learn advanced python , but if you're interested , I would highly recommend going for it π . It's a great language after all.
things in pythoon are very logical but to get the logic takes time
Maybe..
Although I think python is a very intuitive language, it depends on how familiar you are with the language at the end of the day.
should i watch videos how people do projects to get the logic how they think ?
or just code small functions, for loops and etc
You could watch Corey Schafer or Sentdex on youtube if you prefer video tutorials over text.Their explanations would really suit you, and the python discord recommends them on their resources page too.
thank you very much π
Absolutely. π
i thought to have a group call and code together
but people what are more advanced will be too lazy to have a call with people what are at the beginning
Or..some people aren't comfortable coding in the presence of others too. Depends on what you like to do personally.Also if you encounter any issues you could ask in one of the help channels at anytime#βο½how-to-get-help.
i wanna code simple stuff of coure
what else is hard to connect functions, that one function use 3-4 other cunftions, to make the connection
i already saved
functions *
yes i have
Actually, the absolute steep progress you make is when you begin learning to code, atleast from what I've seen. Soon when you have learned the basics, you move onto problems, and the actual learning curve when you learn new concepts, flattens out, unless you're determined from day one. It's just how it is...
okay, i will check out the web site that you sent me π thank you very much that you find time to have a call woth me
yeah practicing is the best , i have to go though many basic exercises
practicing π
Absolutely.
Kay people hope you have a great rest of your day!
I'll take my leave for now.
Peace 
Cya
have a nice day too
how often do you code soemthing? does it make sense to watch how other people code?
without documentation im nothing in python
TechWithTim
exactly, to see how other people think
do you watch videos how people code? or you watched at the beginning and now you try to solve problems by yourself?
why i cant talk? haha do i have to text here 50 messages?
CodeWithMosh
#voice-verification
yuos
beginnerπ©
actually not even beginner
not today a week ago
on edx
loops
elif
no its just for fun
i find it amusing
wanna suggest me some channels
software aPPs
tell me about it
lol me an indian
Myanmar
:O
sneeze moment
covid = π
aah ok
lol
i cant even join the svc
sad
i legit can not talk
this is sad
i want to talk
Please link a starter book for a code n00b
!resources
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
hi
@primal bison Looking
same.
Whats the problem
With
guyz can u tell me y open command is not working
you do not have the command open installed
find the package associated with the command open and the do sudo apt install <package name> if the package name is name then you would do sudo apt install name
it looks like you might be on windows using wsl if so I do not think that you are doing this correctly, if you want to open an image I do not know if you can. just open the image not from the command line
I use feh to open my images on linux, but I do not think that feh will work on wsl because feh needs xorg and needs a display
@rain raptor
κ·Έ
Server information
Created: 3 years, 11 months and 24 days ago
Voice region: europe
Features: MEMBER_VERIFICATION_GATE_ENABLED, NEWS, RELAY_ENABLED, PREVIEW_ENABLED, BANNER, PARTNERED, VANITY_URL, DISCOVERABLE, VIP_REGIONS, WELCOME_SCREEN_ENABLED, COMMUNITY, ANIMATED_ICON, INVITE_SPLASH
Channel counts
Category channels: 27
News channels: 8
Text channels: 152
Voice channels: 12
Staff channels: 66
Member counts
Members: 125,959
Staff members: 86
Roles: 80
Member statuses
23,392
102,568
@night lily why?
@primal bison Pardon?
nthn youre a guy I know from another server
@primal bison Kivy?
DevCord
What's that?
@primal bison I believe you may be mistaken as to my identity. I don't recall ever having been a part of that server.
OpalMist is not unique to myself, though I am perhaps the most prolific.
heh
Need help? @somber lantern
@severe flame.
Letβs say Iβm a hobbyist
Can I talk to you a sec?
π©
how i can improve my brain
lol
i can't find solutions of tasks
without internet
!docs
β’ kivy
β’ matplotlib
β’ more_itertools
β’ networkx
β’ numpy
β’ pandas
β’ pillow
Why find one when someone already did it for you π€£
!docs python
python```
[python](https://www.python.org) is an object oriented interpreted language widely used for scripting, application development, web application servers, scientific computing and more.
@dataclass
class Via:
ident: str
type: str
def __post_init__(self):
if self.type not in ['SID',
'STAR',
'AWY-HI',
'AWY-LO',
'NAT',
'PACOT']:
raise ValueError(f"{self.type} is not a valid Via type")
.card {
color: white;
float: left;
width: calc(25% - 20px);
padding: 10px;
border-radius: 10px;
margin: 10px;
height: 200px;
-webkit-filter: grayscale(100%);
filter: grayscale(100%);
background: no-repeat center fixed;
background-size: cover auto 100%;
transition: 400ms;
}
.card:hover {
-webkit-filter: none !important;
filter: none !important;
transition: 350ms;
}
.card p {
font-size: 18px;
}
.cardContainer:after {
content: "";
display: table;
clear: both;
}
@media screen and (max-width: 600px) {
.card {
width: 100%;
-webkit-filter: none !important;
filter: none !important;
}
}
<div class="card" style="background-image: url('https://cdn.statically.io/img/i.imgur.com/O9Wmyek.jpg');">
<h2>Fourth card</h2>
<p>Some text</p>
</div>
{% extends "layout.html" %}
{% block title %}
Home
{% endblock %}
{% block head %}
<link rel="stylesheet" href="{{url_for('static', filename='cards.css')}}">
{% endblock %}
{% block body %}
<div class='box'>
<div class='wave -one'></div>
<div class='wave -two'></div>
<div class='wave -three'></div>
</div>
<div class="container">
<h1>SyncChat</h1>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatibus iste ducimus ex consectetur, vitae, tempora architecto nisi quaerat animi esse eligendi vel corporis at doloribus minima suscipit labore hic facilis.</p>
<div class="card" style="background-image: url('https://cdn.statically.io/img/i.imgur.com/O9Wmyek.jpg');">
<h2>Fourth card</h2>
<p>Some text</p>
</div>
</div>
{% endblock %}
<style>
.card {
color: white;
float: left;
width: calc(25% - 20px);
padding: 10px;
border-radius: 10px;
margin: 10px;
height: 200px;
-webkit-filter: grayscale(100%);
filter: grayscale(100%);
background-size: cover;
transition: 400ms;
}
.card:hover {
-webkit-filter: none !important;
filter: none !important;
transition: 350ms;
}
.card p {
font-size: 18px;
}
.cardContainer:after {
content: "";
display: table;
clear: both;
}
@media screen and (max-width: 600px) {
.card {
width: 100%;
-webkit-filter: none !important;
filter: none !important;
}
}
</style>
</head>
<body>
<div class='box'>
<div class='wave -one'></div>
<div class='wave -two'></div>
<div class='wave -three'></div>
</div>
<div class="container">
<h1>SyncChat</h1>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatibus iste ducimus ex consectetur, vitae, tempora architecto nisi quaerat animi esse eligendi vel corporis at doloribus minima suscipit labore hic facilis.</p>
<div class="card" style="background-image: url('https://cdn.statically.io/img/i.imgur.com/O9Wmyek.jpg');">
<h2>Fourth card</h2>
<p>Some text</p>
</div>
</div>
big dog is watching you
_ = "!"
__ = "'"
___ = "d"
____ = "e"
_____ = "h"
______ = "i"
_______ = "l"
________ = "n"
_________ = "o"
__________ = "p"
___________ = "r"
____________ = "t"
_____________ = "w"
______________ = "("
_______________ = ")"
________________ = " "
_________________ = __+_____+____+_______+_______+_________+________________+________________+_____________+_________+___________+_______+___+_+__
__________________ = __________+___________+______+________+____________+______________
eval(__________________+_________________+_______________)
!e
_ = "!"
__ = "'"
___ = "d"
____ = "e"
_____ = "h"
______ = "i"
_______ = "l"
________ = "n"
_________ = "o"
__________ = "p"
___________ = "r"
____________ = "t"
_____________ = "w"
______________ = "("
_______________ = ")"
________________ = " "
_________________ = ++++++++++___________++++__
__________________ = +++++_____________
eval(++_______________)
@wide aurora :white_check_mark: Your eval job has completed with return code 0.
hello world!
!e
_ = "!"
__ = "'"
___ = "d"
____ = "e"
_____ = "h"
______ = "i"
_______ = "l"
________ = "n"
_________ = "o"
__________ = "p"
___________ = "r"
____________ = "t"
_____________ = "w"
______________ = "("
_______________ = ")"
________________ = " "
_________________ = __+_____+____+_______+_______+_________+________________+________________+_____________+_________+___________+_______+___+_+__
__________________ = __________+___________+______+________+____________+______________
eval(__________________+_________________+_______________)
@rustic forge :white_check_mark: Your eval job has completed with return code 0.
hello world!
!e import math
@rustic forge :warning: Your eval job has completed with return code 0.
[No output]
!e import brian
@wide aurora :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | ModuleNotFoundError: No module named 'brian'
!e import griffbrain
@modest vortex :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | ModuleNotFoundError: No module named 'griffbrain'
hi how day is every ones
I just told you, #python-discussion is the place to talk
!e True
@serene spruce :warning: Your eval job has completed with return code 0.
[No output]
!e False
@serene spruce :warning: Your eval job has completed with return code 0.
[No output]
!e import tkinter
!e import tkiter
@raw turtle :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | ModuleNotFoundError: No module named 'tkiter'
!e print("Heelo")
@raw turtle :white_check_mark: Your eval job has completed with return code 0.
Heelo
!e print ("HELLO_WORLD")
@slender rover :white_check_mark: Your eval job has completed with return code 0.
HELLO_WORLD
!e while True:
print("Hello world")
oh π
num = [5, 2, 5, 2, 2]
for number in num:
print(number*'*')
!e num = [5, 2, 5, 2, 2]
for number in num:
print(number*'*')
@primal bison :white_check_mark: Your eval job has completed with return code 0.
001 | *****
002 | **
003 | *****
004 | **
005 | **
!e import requests
@primal bison :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | ModuleNotFoundError: No module named 'requests'
smh just make requests part of python
We the eval command cut off from the net, so it wouldn't be of any use
driver = webdriver.Chrome(executable_path='C:/path/to/chromedriver.exe')
If you wanna know how to obfuscate your python3 code hmu
do you have some example obfuscated code? i would like to see if i can undo it.
!e print('Hello, world!')
@icy hazel :white_check_mark: Your eval job has completed with return code 0.
Hello, world!
!e name = input()
@icy hazel :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | EOFError: EOF when reading a line
hey can someone help on my problem, pls
my problem:
can you tell how to get users name, Birthday, gender using his google account ??
they might mean using their api
Hi how can I get the index of a value in a multi-dimensional list(no loop)
!e
= "!"
= "'"
= "d"
= "e"
_ = "h"
__ = "i"
__ = "l"
__ = "n"
__ = "o"
__ = "p"
__ = "r"
__ = "t"
__ = "w"
__ = "("
__ = ")"
__ = " "
__ = +___++___+__+__+__+__+__+__+__+__+++
__ = __+__+__+__+__+__
eval(__+__+___)
@stiff hemlock :x: Your eval job has completed with return code 1.
001 | File "<string>", line 1
002 | = "!"
003 | IndentationError: unexpected indent
!e
_ = "!"
__ = "'"
___ = "d"
____ = "e"
_____ = "h"
______ = "i"
_______ = "l"
________ = "n"
_________ = "o"
__________ = "p"
___________ = "r"
____________ = "t"
_____________ = "w"
______________ = "("
_______________ = ")"
________________ = " "
_________________ = __+_____+____+_______+_______+_________+________________+________________+_____________+_________+___________+_______+___+_+__
__________________ = __________+___________+______+________+____________+______________
eval(__________________+_________________+_______________)
@rotund beacon can u come to off topic vc?
import random
import turtle
from typing import List, Tuple
class Racer:
def __init__(self, name: str, colour: str, x: int):
self.name = name
self.colour = colour
self._turtle = turtle.Turtle()
self._turtle.color(colour)
self._turtle.penup()
self._turtle.shape('turtle')
self._turtle.setheading(90)
self._turtle.setx(x)
self._turtle.sety(-250)
@property
def position(self) -> Tuple[float, float]:
return self._turtle.pos()
def move(self):
self._turtle.pendown()
self._turtle.forward(random.randrange(1, 20))
def delete(self):
self._turtle.clear()
def winner_dance(self):
self._turtle.penup()
self._turtle.setpos(0, 0)
self._turtle.shapesize(5, 5, 12)
for _ in range(20):
if random.randint(0,1):
self._turtle.left(random.randint(45, 90))
else:
self._turtle.right(random.randint(45, 90))
def race(participants: List[Racer]) -> Racer:
while True:
for racer in participants:
racer.move()
if racer.position[1] > 200:
return racer
width, height = 500, 500
turtle.screensize(width, height)
my_racers = [
Racer("Lightning McQueen", "Red", (width//5)*-2),
Racer("Troybert", "Blue", (width//5)*-1),
Racer("Eco Warrior", "Green", (width//5)*0),
Racer("Ninja Pingu", "Black", (width//5)*1),
Racer("Privlidged", "Grey", (width//5)*2)
]
winner = race(my_racers)
print(f"The winner was: {winner.name}")
my_racers.remove(winner)
for racer in my_racers:
racer.delete()
winner.winner_dance()
# Output to file
with open('scores.txt', 'w') as f:
f.write(winner.name)
Hii can I ask a doubt here??
I'm getting an error that is 'tuple' object has no attribute 'append'. How do I fix???
Ya ask
someone help me in vc 2
!e print ("HELLO_WORLD")
@balmy nova :white_check_mark: Your eval job has completed with return code 0.
HELLO_WORLD
majiiki
!e print(5+4)
@remote juniper :white_check_mark: Your eval job has completed with return code 0.
9
@primal bison
def print_remaining_tasks(task_list): #TOTAL : 56 characters
if len(task_list) == 0:
print('Congratulations you win !')
quit()
elif task_list != []:
task = task_list[0]
print(f'| {task[0]}'+ (15 - len(' ' + task[0]))*' '+
f'| {task[1]}' + ' km' + (16-len(' km'+task[1])) * ' ' +
f'| {task[2]}' + ' km' + (10- len(' km' + task[2])) * ' ' +
f'| {task[3]}' + (10-len(' '+task[3])) * ' ' + '|')
else:
print(56 * '-')
return(print_remaining_tasks(task_list[1:]))
--------------------------------------------------------
| TaskName | ByFootDistance | ByPegasus | HPNeeded |
--------------------------------------------------------
| Task1 | -1 km | 400 km | 50 |
| Task2 | -1 km | 500 km | 100 |
| Task3 | 600 km | 500 km | 75 |
| Task4 | 1000 km | 500 km | 50 |
| Task5 | 900 km | 700 km | 80 |
Congratulations you win !
--------------------------------------------------------
| TaskName | ByFootDistance | ByPegasus | HPNeeded |
--------------------------------------------------------
| Task1 | -1 km | 400 km | 50 |
| Task2 | -1 km | 500 km | 100 |
| Task3 | 600 km | 500 km | 75 |
| Task4 | 1000 km | 500 km | 50 |
| Task5 | 900 km | 700 km | 80 |
--------------------------------------------------------
that format for table should be using an external function
--------------------------------------------------------
| TaskName | ByFootDistance | ByPegasus | HPNeeded |
--------------------------------------------------------
| Task1 | -1 km | 400 km | 50 |
| Task2 | -1 km | 500 km | 100 |
| Task3 | 600 km | 500 km | 75 |
| Task4 | 1000 km | 500 km | 50 |
| Task5 | 900 km | 700 km | 80 |
--------------------------------------------------------
nice avatar
ty xd
where did you find that
input("Press Enter to continue...")
i cant speak
i left the group
due to technical issues
i cant hear
taht day
yes
yeah
hmm
its okay
1 more day
to go
!e for i in range(1, 10): print('hello, this is execution nr. ', i)
@manic zinc :white_check_mark: Your eval job has completed with return code 0.
001 | hello, this is execution nr. 1
002 | hello, this is execution nr. 2
003 | hello, this is execution nr. 3
004 | hello, this is execution nr. 4
005 | hello, this is execution nr. 5
006 | hello, this is execution nr. 6
007 | hello, this is execution nr. 7
008 | hello, this is execution nr. 8
009 | hello, this is execution nr. 9
!e x = 10
@manic zinc :warning: Your eval job has completed with return code 0.
[No output]
@manic zinc :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | NameError: name 'x' is not defined
Hey tim
@fallow thistle :warning: Your eval job has completed with return code 0.
[No output]
!e print('hey Kevin Tempel')
@fallow thistle :white_check_mark: Your eval job has completed with return code 0.
hey Kevin Tempel
@rustic python
π
!e
π
dict[list(dict.keys())[0]]
i needd help to remove all the extra stuff in my terminal
i want my terminal to only show the code that it should
@dry copper
hi
Hey, so you don't have voice permissions yet?
can you just add me we call and then you un add me
Sorry, I'd rather keep discussions inside the server.
What is it you're having trouble with?
i dont think i can do it then because ive tried to explain to 3 different servers and no one could figure out how to help over text
thanks for trying to help
but its not possible for me to show you
You sure?
thats what i got for you
that one error needs to be fixed thats it
everything else works
Hmm. Maybe it is the spacing.
This looks like a test, so I'm hesitant to directly give you the answer.
no i just started the program
dont worry ahaha
its this program called code hs
its just orur assingment for the day
Wait, sorry
ok
It might just be the way that they check your answer. Looks like they are doing some kind of text pattern-matching.
yea its so annyoing
Can you try removing the parentheses around age?
done
This might be messing with their grading script.
Perhaps they expect you to do 'blah blah blah' + str(age)
been trying to figure this out for 2 hours and my teacher really said yea you did it right they just want it differently
yea i tried that too
Erm, does the score from this test affect anything?
coutns as a 0
says not complete
so dumb
it litteraly works
but nooooooo i dont wanna im a teacher that doesnt teach
Yeah, seems like it's a problem with the grader. Your solution looks fine.
So your teacher can't just bypass the automated grader for you?
ok imma take a break nothing is working i might have to take the 0
no they say there is a right way to do it
but hes not helping this is litteraly the second day of class cut me some slcak
im so frustrated if you cant tell imma take a break
Yeah that sucks
thanks for trying to help unlike my teacher
Oh right.
zoom calls
Anyway, heading back to off-topic. Cya
bye bye
good morning everyone
gm
@amber elm
@ivory kernel @amber elm @maiden wind
@maiden wind did he leave?
yeah think so
yep
Anyone help pls
goodmorning
hey i have a question if i have a loop and everytime it gives me a word and i want to concatenate the words how i do thta
Hi everyone! I'm new to python and the coding world in general. trying to change fields from electrician to coding. I have been told that python is a good language to learn. I have been watching coding videos on youtube to kind of learn things but I was hoping to make some friends in the coding community to help accelerate the learning process. Any ideas on good videos to learn with or any tools, tricks, or exercises would be greatly appreciated! Kinda feels a little overwhelming but i'm determined to learn a little more than I did yesterday! Feel free to dm me or add me if you have ANY knowledge you would be willing to share with me!
!resources We've got a whole slew of resources here on our site! From texts to videos. We've also got a section on suggestions for code editors and the like
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
@royal temple Just in case you miss this message 
import concurrent.futures
with concurrent.futures.Executor() as executor:
futures = {executor.submit(perform, task): task for task in get_tasks()}
for fut in concurrent.futures.as_completed(futures):
original_task = futures[fut]
print(f"The result of {original_task} is {fut.result()}")
def stuff(word, word_list):
unfiltered = process.extract(word, word_list, limit=None)
filtered = []
for match, score in unfiltered:
if score...:
filtered.append((match, score))
return filtered
@molten crow yea this is quite a complex topic right now
Yeah, i got all the intermediate thing i think, but i dived into concurrent one time and got lost haha
["hey", "hello"]
process.extractBests(word, word_list, limit=None, score_cutoff=75)
Just learnt a new way to use list comprehension. Thank you !
You dont have a shared state . That's why its better to be a pure function
woah hey there looks like someones doing some card counting
That would be more simplier than that concurrent.future multiprocessing thing haha
lol big brain go brrr
[ word for word in words if <some-condition>]
I have to go. I hope some days i will be able to show you some code i'm doing and get your return guys, as i might to some things wrong haha. I learnt a lot and i thank you all !
@ornate thistle
Traceback (most recent call last):
File "C:\Users\Yash\anaconda3\lib\site-packages\selenium\webdriver\common\service.py", line 72, in start
self.process = subprocess.Popen(cmd, env=self.env,
File "C:\Users\Yash\anaconda3\lib\subprocess.py", line 854, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\Yash\anaconda3\lib\subprocess.py", line 1307, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:/Users/Yash/Desktop/YouTubeShop-master/yt.py", line 26, in <module>
server = botgaurd.server_start()
File "c:\Users\Yash\Desktop\YouTubeShop-master\lib\auth.py", line 16, in server_start
self.browser = webdriver.Chrome(executable_path=r"lib\chromedriver.exe")
File "C:\Users\Yash\anaconda3\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 73, in init
self.service.start()
File "C:\Users\Yash\anaconda3\lib\site-packages\selenium\webdriver\common\service.py", line 81, in start
raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: 'chromedriver.exe' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
WebDriver for Chrome
my pip not working
Import "lib.auth" could not be resolved
Import "lib.execption" could not be resolved
Import "lib.action" could not be resolved
Import "lib.cli" could not be resolved
"Botgaurd" is not defined
some on help me
High Low Open Close Volume Adj Close
Date
2015-12-31 56.189999 55.419998 56.040001 55.480000 27334100.0 50.627274
2016-01-04 54.799999 53.389999 54.320000 54.799999 53778000.0 50.006744
2016-01-05 55.389999 54.540001 54.930000 55.049999 34079700.0 50.234879
2016-01-06 54.400002 53.639999 54.320000 54.049999 39518900.0 49.322346
2016-01-07 53.490002 52.070000 52.700001 52.169998 56564900.0 47.606789
do you know what kind of programs do people pay for in python?
data scientists maybe
data scientists and backend web developers
Yeah bruh!
homework
@young imp :white_check_mark: Your eval job has completed with return code 0.
{1, 2, 3}
Alice and Bob like to play with colored cubes. Each child has its own set of cubes and each cube has a distinct color, but they want to know how many unique colors exist if they combine their block sets. To determine this, the kids enumerated each distinct color with a random number from 0 to 108. At this point their enthusiasm dried up, and you are invited to help them finish the task.
Given two integers that indicate the number of blocks in Alice's and then Bob's sets N and M. The following N lines contain the numerical color value for each cube in Alice's set. Then the last M rows contain the numberical color value for each cube in Bob's set.
Find three sets: the numerical colors of cubes in both sets, the numerical colors of cubes only in Alice's set, and the numerical colors of cubes only in Bob's set. For each set, print the number of elements in the set, followed by the numerical color elements, sorted in ascending order.
4 3
0
1
10
9
1
3
0
2
0
1
2
9
10
1
3
!e
print("Bye guyz, Catch you later!")
@warped musk :white_check_mark: Your eval job has completed with return code 0.
Bye guyz, Catch you later!
bye
see ya
def print_set(some_set):
print(len(some_set))
print(*[str(some_set)])
N, M = [int(s) for s in input().split()]
A_colors, B_colors = set(), set()
for i in range(N):
A_colors.add(int(input()))
for i in range(M):
B_colors.add(int(input()))
print_set(A_colors & B_colors)
print_set(A_colors - B_colors)
print_set(B_colors - A_colors)
!e
x = [1, 2, 3, 4]
print(x)
print(*x)
@young imp :white_check_mark: Your eval job has completed with return code 0.
001 | [1, 2, 3, 4]
002 | 1 2 3 4
print(*x) = print(1, 2, 3, 4)
N, M = [int(s) for s in input().split()]
N, M = input().split()
import discord
import os
import requests
import json
client = discord.Client(800743802045726733)
def get_quote():
response = requests.get("https://zenquotes.io/api/random%22%22")
json_data = json.loads(response.text)
quote = json_data[0]['q'] + "-" + json_data[0]['a']
return(quote)
@client.event
async def on_ready():
print("We have logged in as {0.user}.format".format(client))
@client.event
async def on_message(message):
if message.author == client.user:
return
if message.content.startswith("//inspire"):
quote = get_quote()
await message.channel.send(quote)
client.run(os.getenv("Token"))
Missing a closing qu- you got it
If I need help with some code do I mention it in here?
import requests
url = "https://currencyapi-net.p.rapidapi.com/rates"
querystring = {"output":"JSON","base":"USD"}
headers = {
'x-rapidapi-key': "API",
'x-rapidapi-host': "currencyapi-net.p.rapidapi.com"
}
response = requests.request("GET", url, headers=headers, params=querystring)
print(response.text)
It ouputs this
How do I grab some data from the dictionary?
how can I use "return" I cant use this
Where do u want to use?
you have to decode it with this:
`import json
decoded_response = json.loads(response.text)
then you can you each key of dict you want like this:
print(decoded_response['valid'])
`
Np
!e
!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!*
!e print("Hello!")
TypeError: sequence item 0: expected str instance, list found
mylist = ['x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x',
'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x', 'x',
'x', 'x', 'x', 'x', 'x', 'x', 'x']
result = '\n'.join(mylist[x:x+90] for x in range(0, len(mylist), 90))
print(result)
def initialize_map():
Root.update()
DemoMap['map'] = DemoMap['map'].replace('\n', '')#all new lines are deleted from the maps
DemoMap['map'] = DemoMap['map'].replace('x', ' ')#x's are replaced with spaces to make the map feel open
wCounter = 1#the width and height counter are used so the function prints
hCounter = 1#according to the dimension of the map
for e in DemoMap['map']:
Root.update()
Cell[e] = dict(x=wCounter, y=hCounter, gfc=f'{e}')#cells are given an x,y and graphic
CellList.append(Cell[e])
SceneW.insert('insert', Cell[e]['gfc'])
wCounter += 1
if wCounter > DemoMap['w']:
Root.update()
wCounter = 1
hCounter += 1
SceneW.insert('insert', '\n')```
for cell in CellList:
Root.update()
if cell['x'] == Player['x'] and cell['y'] == Player['y']:#this condition assigns a graphic to the temporary
tempGfc = Player['gfc'] #variable which tells the function what graphic to print
else:
tempGfc = cell['gfc']
SceneW.insert('insert', tempGfc)
wCounter += 1
if wCounter > DemoMap['w']:
Root.update()
wCounter = 1
SceneW.insert('insert', '\n')```
from audioplayer import AudioPlayer
import threading
global audio
class InputCapture(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
def run(self):
while True:
choice = input('Do something\n')
if choice == 'pause':
audio.pause()
elif choice == 'resume':
audio.resume()
elif choice == 'stop':
audio.stop()
audio = AudioPlayer('do i wanna know.mp3')
audio.play()
x = InputCapture()
x.start()
hello
can anyone help in vc
i have a question about pip
it doesnt seem to be working properly on my device
You havent imported sklearn.
Type import sklearn
ok
so im not going to use that example
take a look at this
i want to play a sound file
using playsound
so that is my code
those two first lines overwrite each other
first playsound is the module
then it is the function
or channge it from sklarn import model_seleection``` and change to model_selection..`
and this is my workspace
so when i run the code....
this is the error
and i already installed in pip
you don't have the package playsound installed
it says its already satisfied
also
when i do pip list
it shows up
so idk why it says no module named playousound
and the same thing happened for a module named winsound
and kivy
so i know it doesnt have to do with this specific module
are you in a virtual environment
Nope. he is not
I think, there is a problem with system paths in order to find to packages.
Can you try adding the path to the location where packages are installed into $PYTHONPATH