#voice-chat-text-0
1 messages ยท Page 1030 of 1
Are you talking about dunders?
!e ```py
class MyClass:
def add(self, v):
return "Hello!"
mc = MyClass()
print(mc + 1)```
@somber heath :white_check_mark: Your eval job has completed with return code 0.
Hello!
Wow
The 1 is given to v as an argument.
!e py print(9 > 6)
@somber heath :white_check_mark: Your eval job has completed with return code 0.
True
Yes
@rugged tundra what
Lol
On rio the janeiro
in everywhere often
2 on discord 1 irl
is that true? you guys really dont know geography?
maybe theres more
yes, definitely
A place where they live for the cheese
Minas gerais
Clever boy
Our Geography classes:
Lmao
Class Dismissed
In our classes teachers talk more about mesopotamia
Missy, the Messy Hippopotamus from Mesopotamia.
I have to go tchau tchau
flw
Define hacking.
Well , that would be hard for me
Does any of you have a good understanding of the os and tools for electronic devices
I want to find a way to access the console or os of an android phone
Dude
That guy sounds like mr robot
The Android debug bridge shell is one way. There's also a number of terminal emulator apps. I use termux.
You might also like to check out the xda-developers forum.
I want to access it from the very phone
I can get the debug.log
Yet i have no computer at hand now
I dont know how to open it from the phone
Dude , he sounds like Elliot from Mr.Robot
you want to debug your own phone?
xda-developers
App ?
Website forum.
He sounds like he didn't sleep for days
Hahaha
Can you clone android 11?
context? clone like a repo?
And modify it , installing and arbitrary version of it , passing it as authentic ?
Os i mean
Clone the os
But why
!rule 5
5. Do not provide or request help on projects that may break laws, breach terms of services, or are malicious or inappropriate.
I dont think thats possible
I mean, is possible, but an user will never download another firmware
Hm , yeah , it kinda tricky
Opal , how many langs do you know so far ?
programming langs?
Yeah
3 by domain
3 ?
yeah, I dont count that ones I use just for write another hello world
Python is the only language I know how to code in worth a damn.
How can i create a program that creates and sort folders in a computer
And assing x type of file to x folder class ?
me is py and js (because of web)
I want to get a job as a programmer
Any suggestions ?
Other than learning of course
I will not write a code by now, but you should start creating lists and increment them with the names and probably will be so slow on your first write
By the way , whats the limit of what we can do with the !e
Create something, so create something better than before, and so on... make it all public
!e
while true:
print("hello")
@rocky gust :x: Your eval job has completed with return code 1.
001 | File "<string>", line 2
002 | print("hello")
003 | ^
004 | IndentationError: expected an indented block after 'while' statement on line 1
write about what you did
!e
while True:
print("hello")
@rocky gust :x: Your eval job has completed with return code 1.
001 | File "<string>", line 2
002 | print("hello")
003 | ^
004 | IndentationError: expected an indented block after 'while' statement on line 1
It will show a few lines, then tell you it timed out and that there's no log because it was too long.
!e py while True: print("Hello.")
@somber heath :x: Your eval job has completed with return code 143 (SIGTERM).
001 | Hello.
002 | Hello.
003 | Hello.
004 | Hello.
005 | Hello.
006 | Hello.
007 | Hello.
008 | Hello.
009 | Hello.
010 | Hello.
011 | Hello.
... (truncated - too many lines)
Full output: too long to upload
Oh
ah, you can write in ' ` '
Indentation
!e
print('{}'.format(print('x')))
@wary haven :white_check_mark: Your eval job has completed with return code 0.
001 | x
002 | None
py
I gonna sleep
!e
print('{}'.format(print(1+2))
@rocky gust :x: Your eval job has completed with return code 1.
001 | File "<string>", line 1
002 | print('{}'.format(print(1+2))
003 | ^
004 | SyntaxError: '(' was never closed
hellooo
can't speak for now, other people in the room
my start date has been pushed back due to immigration issues so I don't have to pick a username for a while
@somber heath
Hello Kirti, how are you doing?
I'm alright!
Yep, but I live in Canada
Yep, I originally came here for my undergrad in 2016
now I'm sticking around to work
wby, where are you from in India (if from there)?
ah cool I see, I was brought up in Kolkata, but born in chennai
but to add more fun to the confusion, my family is from Gujarat
yep, I guess I'm closest to Gujarati, that's what i speak at home
I should know a little, but I do not ๐
No I have never lived in Chennai, my mom's family was there
they speak tamil, I do not
technically my grandparents from both sides are from gujarat, they just ended up moving to west bengal / tamil nadu for work stuff
aam ras is a classic
technically, but it's like thicker and we have it like a gravy with roti
oh true, gujarati people have great snacks and sweets haha
gonna get kicked out soon?
dont use logic bruh, its just some stupid message xD
!e
print("HI")
@cunning monolith :white_check_mark: Your eval job has completed with return code 0.
HI
!e
while True:
@cunning monolith :x: Your eval job has completed with return code 1.
001 | File "<string>", line 1
002 | while True:
003 | ^
004 | IndentationError: expected an indented block after 'while' statement on line 1
!e
while True:
print(Hello)
@cunning monolith :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 2, in <module>
003 | NameError: name 'Hello' is not defined
!e
while True:
print('Hello')
@cunning monolith :x: Your eval job has completed with return code 143 (SIGTERM).
001 | Hello
002 | Hello
003 | Hello
004 | Hello
005 | Hello
006 | Hello
007 | Hello
008 | Hello
009 | Hello
010 | Hello
011 | Hello
... (truncated - too many lines)
Full output: too long to upload
!e
code
!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
pip
@cunning monolith :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 'pip' is not defined. Did you mean: 'zip'?
!e
import pandas
@cunning monolith :warning: Your eval job has completed with return code 0.
[No output]
Hello!
Fan death is the alleged death of humans as a result of running an electric fan in a closed room with unopened or no windows. While the supposed mechanics of fan death are impossible given how electric fans operate, belief in fan death persisted to the mid-2000s in South Korea, and also to a lesser extent in Japan.
I wonder if theres actual scientific evidence of this being true
.
๐ฌ
Yup, so far all ive found are "alleged" deaths due to proposed increased CO2 levels, but nothing authentic
This is precisely the same mentality behind my parents still thinking that the microwave oven makes food radioactive
Mine think they reduce the vitamin content of food
There is evidence of reduced B12 but nothing dangerous
Who cooks orange juice? Other than as a lamb marinade?
There are some hot orange drinks it seems
Yeah, we're decreasing now, but Father's day is going to be a super spreader event because the forecast is for good weather
This is how we measure our butter in America
@willow light leftists can be gun owners, but their bones are weak from drinking soylent 24/7
so it wont help much during the civil war
Opal is coping so hard
straw man much
yeah, not wanting 30 million illegal immigrants is the same thing as wanting gay people dead and wanting slaves?
racism is absolutely the same thing as racism
and Opal is speaking from such a privilage position
his country has near 0 illegal migrants
.topic
the right to bear arms is constitutionally protected. you will never take our guns.
if leftists tried to take our guns civil war would ensue and let me remind you that 70% of military members are republican.
7. Keep discussions relevant to the channel topic. Each channel's description tells you the topic.
you are not a jurist and neither am i
law is a complicated matter
you cant just read words and assume thats what they mean
children die in australia/nz too
I mean, that's precisely what the Supreme Court does
swimming pools kill 700 children year and 200 children are killed by mass shottings
Not by being killed by other children
lets ban pools then
world would have been a better place without Karl Marx, Bernie Sanders, AOC, and Ilhan Omar
i have studied history. i know Joseph Stalin killed 100 million people, so did Mao, and Pol Pot killed millions too.
Just wait until you find out about Adolf Hitler then
Your point being?
Or does it only count when left-wingers do it?
in reference to what he said in VC
hitler was very bad - obviosuly. but he didnt kill as many people as stalin or mao.
funny how you dont treat stalin and mao with the same level of outrage as you do hitler
All I'm saying is, if you're going to mention genocides, don't just list the ones that benefit your narrative
You also didn't mention the ones done by Churchill, Jackson, and Xi
My point exactly
1943 Indian Famine was directly because of Churchill.
bengal famine is the problem of the people in the bengal region
why on earth is that the responsibility of a small island nation thousands of miles away
And that doesnt count?
And you say you studied history
everything is blame the white man no matter how ridiulous the jump
you only study far left history
not objective history
because their policies is what caused it my dude
Maybe you should study history better ๐
I think we all need to re-read #code-of-conduct
Agreed. We should drop politics
youre mad someone else has a different political view than you so you cry to the mods
typical leftist tbh
No, I'm mad that you're ignoring server rules. I tolerated it until you started making racist remarks.
I'll tolerate politics until it gets hateful
So either you can agree to be civil, or you can keep your thoughts to yourself.
Whats the deal with people hating python?
It is the same as people hating JavaScript or Java or C# or Rust or Go or Ruby: Every language except the one I like is terrible.
A good way to tell someone is new to programming is when they dislike a specific language. When you're experienced, you learn to hate them all.
Thats reassuring ๐
Bit of an immature way to handle life i think
I like to say that a beginner says "If it works, it works."
An intermediate says "Use this language with that framework, because it's new and exciting"
An expert says "If it works, it works."
how is it not filled with divs?
if you do inspect element on practically any website, its filled with divs
and also people who deal with data have more expierence with python than JS
@woeful salmon pyscript is converted to bytecode and that bytecode runs directly on the browser
Are we allowed to ask questions on voice chat or is help exclusive to the help channels?
What would you like to ask?
@whole bear mind posting your code in chat and writing your question?
!e py text = """Apples Pears Grapes""".splitlines() for i, line in enumerate(text): print(i, line)
@somber heath :white_check_mark: Your eval job has completed with return code 0.
001 | 0 Apples
002 | 1 Pears
003 | 2 Grapes
for sure just a second
r"D:\Users\11fileclstr\11(+)protein_clusters_95.text"
from pathlib import Path
filepath = Path('11(+)protein_clusters_95.txt')
#with open("11(+)protein_clusters_95.txt", "r") as file:
# for line in file.readlines():
# targets.add(line.split("|")[1])
targets = set()
with open("11(+)protein_clusters_95.txt", "r") as file:
for line in file.readlines():
try:
targets.add(line.split("|")[1])
except IndexError:
pass
import os
#line = 'your line'
checker = {}
for i in os.listdir('11_proteomes'):
with open(f'11_proteomes/{i}') as f:
read = f.readlines()
checker[i] = read
for k, v in checker.items():
if line in v:
print(f'line present in file {k}')
Cluster 55
0 1241aa, >gi|1321426930|gb|AU... *
1 1232aa, >gi|1125856936|gb|AP... at 99.35%
2 70aa, >gi|747120688|gb|AJE... at 91.43%
3 1185aa, >gi|747122515|gb|AJE... at 99.41%
4 1232aa, >gi|1885702788|gb|QM... at 99.35%
5 1241aa, >gi|1979354792|gb|QR... at 100.00%
6 1232aa, >gi|226841129|gb|ACO... at 99.35%
7 1232aa, >gi|1321415750|gb|AU... at 99.35%
8 1236aa, >gi|1370560257|gb|AV... at 99.19%
9 1232aa, >gi|1781365155|gb|QG... at 99.27%
10 1232aa, >gi|1970397862|gb|QR... at 99.27%
Cluster 320
0 765aa, >gi|1321424864|gb|AU... *
1 765aa, >gi|1125859011|gb|AP... at 97.91%
2 765aa, >gi|747119368|gb|AJE... at 100.00%
3 765aa, >gi|1885704214|gb|QM... at 97.65%
4 765aa, >gi|1979356200|gb|QR... at 99.61%
5 765aa, >gi|226844329|gb|ACO... at 97.65%
6 765aa, >gi|1321413721|gb|AU... at 97.65%
7 765aa, >gi|1370558147|gb|AV... at 95.03%
8 199aa, >gi|1781363752|gb|QG... at 97.99%
9 557aa, >gi|1781363753|gb|QG... at 95.87%
10 765aa, >gi|1970399178|gb|QR... at 97.78%
Cluster 468
0 686aa, >gi|1321426236|gb|AU... *
1 686aa, >gi|1125859412|gb|AP... at 98.54%
2 65aa, >gi|747120533|gb|AJE... at 100.00%
3 612aa, >gi|747123135|gb|AJE... at 99.67%
4 686aa, >gi|1885702110|gb|QM... at 98.54%
5 686aa, >gi|1979354081|gb|QR... at 98.40%
6 686aa, >gi|226843118|gb|ACO... at 98.83%
7 686aa, >gi|1321415034|gb|AU... at 98.10%
8 686aa, >gi|1370559578|gb|AV... at 94.31%
9 686aa, >gi|1781365815|gb|QG... at 97.96%
10 686aa, >gi|1970397152|gb|QR... at 97.81%
So the clusters each have lines 0-10
and we have 11 files that these lines have been extracted from
We need to find a way to see which line has been extracted from which of the 11 files
all of them can be from the same file, 2 can be from the same one or all 11 can be from separate files
Sounds like a job for in
yeah, in is your friend
So our output would mention the cluster and each line in the cluster and from which file that line has been extracted from
if protein_a in cluster_1
yup only a few kbs
and they dont chnage
The most clusters i have in a file are 166 and the least is 28 `
efficiency is not key here, I just need my output file ๐
rf"(?<gi\|){<target>}(?=\|gb)"
Im so sorry but can you also explain what this is doing?
(?<=gi\|)
I did use regex to extract these lines in the first place ๐
(?=\|gb)
!epy texts = ["abc", "def", "ghi"] candidate = "f" for it, t in enumerate(texts): for li, letter in enumerate(t): if candidate == letter: print(f"Candidate {candidate} found at texts index {it}, index {li}.")
@somber heath :white_check_mark: Your eval job has completed with return code 0.
Candidate f found at texts index 1, index 2.
Im using python 3
Ill try it out thank you!
Ill have to google most of what youve said but ive written it down so ๐
Not sure where in the script i should add this though. It does sound like it would work
probably re.match()
an example of the desired output is as follows:
where cb.....fasta are the 11 original files
This particular cluster has proteins from 7 of the 11 files
import os
import re
from pathlib import Path
filepath = Path('11(+)protein_clusters_95.txt')
targets = set()
with open("11(+)protein_clusters_95.txt", "r") as file:
for line in file:
try:
targets.add(line.split("|")[1])
except IndexError:
pass
#line = 'your line'
checker = {}
for i in os.listdir('11_proteomes'):
with open(f'11_proteomes/{i}') as f:
read = f.readlines()
checker[i] = read
for k, v in checker.items():
for line_num, line in enumerate(v):
for target in targets:
if re.search(rf"(?<=gi\|){target}(?=\|gb)", line):
print(f"found {target} in {k} in line {line_num}")
Ill try and run this real quick
Thank you so much Mr. Reaper
I mean its something atleast ๐
Okay thank you
so theres an error
it says:
print(f"found {target} in {k)")
^
SyntaxError: f-string: unmatched ')'
oh okay okay
Ill change that
theres another error message but thats something wrong on my end I think
If you could just guide me a little
import pathlib
candidate = "line to find"
data = dict()
path = pathlib.Path("./sources/").glob("*.source")
for file in path:
data[file.stem] = file.read_text().splitlines()
for file_name, lines in data.items():
for i, line in enumerate(lines):
if candidate == line:
print(f"Candidate {candidate} found in {file_name} at line index {i}.")```
Traceback (most recent call last):
File "D:\Users\11fileclstr\11fileclstr.py", line 54, in <module>
if re.search(rf"(?<=gi|){target}(?=|gb)", v):
File "C:\Users\Noodles\AppData\Local\Programs\Python\Python39\lib\re.py", line 201, in search
return _compile(pattern, flags).search(string)
TypeError: expected string or bytes-like object
Sounds like they forgot to make your order
yess
Oki dokes
Ill try this too Thank you!
It'll require some massaging.
@woeful salmon what country are you in?
Okay so this works but we need to tweak the output a bit
the end goal is, when I see a cluster that has all 11 proteins from all 11 different files I will separate it from the rest
Because what I need are only the clusters that have 11 proteins from 11 different files of the directory
I bring good news friends
It works, it needs some sorting but ill do that in excel be cause I do NOT know how to do that in python
Sorting is pretty easy in Python.
key function, Noted.
!d sorted
sorted(iterable, /, *, key=None, reverse=False)```
Return a new sorted list from the items in *iterable*.
Has two optional arguments which must be specified as keyword arguments.
*key* specifies a function of one argument that is used to extract a comparison key from each element in *iterable* (for example, `key=str.lower`). The default value is `None` (compare the elements directly).
*reverse* is a boolean value. If set to `True`, then the list elements are sorted as if each comparison were reversed.
Use [`functools.cmp_to_key()`](https://docs.python.org/3/library/functools.html#functools.cmp_to_key "functools.cmp_to_key") to convert an old-style *cmp* function to a *key* function.
^ key parameter
sorting in python is very good
from asyncio import run, sleep, wait
from sys import argv
async def f(n):
await sleep(n)
print(n)
if __name__ == '__main__':
run(wait(map(f, map(int, argv[1:]))))
So what im getting is the following:
found 1970399187 in cb.X58540.fasta in line 19318
found 1970399297 in cb.X58540.fasta in line 20084
found 1970399303 in cb.X58540.fasta in line 20115
found 1970399310 in cb.X58540.fasta in line 20145
found 1970399461 in cb.X58540.fasta in line 21187
found 1970399506 in cb.X58540.fasta in line 21546
found 1970399762 in cb.X58540.fasta in line 23230
found 1970399763 in cb.X58540.fasta in line 23233
and then:
found 1781363780 in cb.NCTC13319.fasta in line 7067
found 1781364492 in cb.NCTC13319.fasta in line 11658
found 1781364493 in cb.NCTC13319.fasta in line 11668
found 1781364700 in cb.NCTC13319.fasta in line 13150
found 1781365147 in cb.NCTC13319.fasta in line 16208
found 1781365161 in cb.NCTC13319.fasta in line 16312
found 1781365187 in cb.NCTC13319.fasta in line 16437
it has sorted it based on the files. I need to sort it cluster-wise
am I making sense?
A sorted / list.sort's key parameter takes a function. Every element of the sort is given to a separate call of the key function. The returns of the function govern the elements' positions in the sort.
so for e.g. it would say:
cluster 16437
0 1781365187 present in cb...fasta
1 1765429978 present in cb...fasta
and so on
I understand
!e ```py
vs = [(1, 3), (2, 2), (3, 1)]
def sort_a(v):
return v[0]
def sort_b(v):
return v[1]
vs.sort(key=sort_a)
print(vs)
vs.sort(key=sort_b)
print(vs)```
@somber heath :white_check_mark: Your eval job has completed with return code 0.
001 | [(1, 3), (2, 2), (3, 1)]
002 | [(3, 1), (2, 2), (1, 3)]
This helps! Thank you!
@woeful salmon wanna play bomb party?
@woeful salmon @somber heath @willow light Thanks for all the help guys! Really appreciate it!
k
this is racism
@frosty star ๐ hello, come join us
@gentle flint just shushed a POC (NoodleReaper)
good ban
UwU
Unless you're german, and then it becomes UvU
pfft
Queen. "Mumma! UwU..." ๐ต
woah.... you guys sound so weird from my side
like robots
whats up with my internet connection
I only hear beep boop can't really pick up details so sorry if I'm not responsive
CONGRATS
HAPPEN
humhumukunukunukuapuaas
@wind raptor yo arent you in the arduino server?
https://jklm.fun/HNAH started a new one that isn't open to public
antidisestablishmentarianism
demisemihemidemisemiquaver
i know of demihemidemisemiquaver through a very good music theory video
A helpful guide created by an unqualified individual.
Now that you can read sheet music why not use your newly-found skills to play the theme from this video? http://bit.ly/2cAcj5W
On a demisemihemidemisemi-related note
https://www.youtube.com/watch?v=VDP6RCJSsMg
Neat
Hello
sup
gud gud
but i have a little problem
and im searching for help.D
:D
Uhm my venv folder in Python is red
and I cant use some things
like def__init__(self)
stuff like that
__
i wish i could stream but
okay wait#
hahahah
A certain L and X comes to mind
@rugged root - What's the difference between .NET Framework and .NET Standard?
Is "Standard" the same as "Core"?
shouldnt there be a space
It is the same, yeah. Framework is the old, Windows specific thing
That never changes
i have had the same issue with semi colons
Mainly an issue if you want to import the files
src/TestActionsDarbia.Codeunit.al line 23
local procedure CreateWarehouseShipments(SalesHeader: Record "Sales Header");```
`src/TestActionsDarbia.Codeunit.al` line 43
```al
local procedure ReleaseWarehouseShipments(SalesHeader: Record "Sales Header";```
Its the python course of freecodecamp
Im almost done with it can you guys recommend anything else afterwards?
This course will give you a full introduction into all of the core concepts in python. Follow along with the videos and you'll be a python programmer in no time!
Want more from Mike? He's starting a coding RPG/Bootcamp - https://simulator.dev/
โญ๏ธ Contents โญ
โจ๏ธ (0:00) Introduction
โจ๏ธ (1:45) Installing Python & PyCharm
โจ๏ธ (6:40) Setup & Hello Wor...
8/10
i would say
need more practice with classes now
but Imma get there
hmm
Okey got it imma think about what I wanna do
thanks
Yes, standard is .Net language formerly known as Core.
Everyone still calls it core though.
my code has been compiling for like the last 30 minutes
thats a good sign
then sleep :|
Huh, I always thought that was hyphenated
i deleted 2 chars, compile time: 199.3s
Exactly
Did we really need to change the name again?
That's any compiled language that does that right?
that's like what, 17 minutes lol
The cost of release building, from what I've read
Worth it once it's up and going for chunky stuff.
Chonk
is my mic broken ๐
oof
@amber raptor , no, it compiles everything then runs
python's execution is basically the same as java, except without jitting
because class definitions can have side effects
Just donโt use YAML 
Guidos slides
Interesting
I'd love to not use yaml
@peak copper Dude, please use push to talk or something while you're sick. The sniffling and coughing is rough
OMG the redwoodjs docs start with a tutorial video that begins with "oh hi, i didn't see you there"
my sides....
BTW I'm in a cafe so I can't talk
WASM is like awesome, but with a w. Despite it feeling like an L all the time.
The only people using wasm are startups, hipsters, and corporations who think that because FAANG uses it they have to as well.
See also YAML
Electron: excellent idea, not so excellent execution
i love when CLion wants to index every file that exists and eats my cpu
Electron is like Communism. Sure it seems like a good idea to some from the outside, but when you actually start using it you realize that it falls apart as soon as people get involved
"Oh huh, the skeleton is different now. Index everything!"
"I changed like, two characters in one f-"
"INDEX EVERYTHING"
although in this case it's kinda fair since i updated rust
That's why you never update rust if your dev environment isn't a docker container
Just use XML Hemlock
clion was being sad about it
Thatโs terrible
That someone was me in 2013.
Did someone say mechanical keyboard? I want to make one as clacky as possible.
With the vim cheatsheet as the keycaps
ughhh now for another 17 minute compile time wait
I'm waiting on a build. It usually takes 2 hours, but that's because I put a whole bunch of sleep commands in the jenkinsfile.
gives me time to work on my summer reading
Don't worry, the prod build doesn't have the built-in waiting
@honest pier Can you show me what it'd look like with just like.... the categories: logs section?
I hate to bother you with it
yeah one sec
I really appreciate it
For speed I recommend Perl. Don't use comments because no amount of documentation will ever make any perl code make sense
</sarcasm>
Don't cast the perl before WINE?
[categories.logs]
all-logs = "text"
big-brother-logs = "text"
duck-pond = "text"
With how it's layered I would
Also doesn't help that I'm having to tweak it a bit more now
So like (I don't know TOML so forgive me):
[categories.logs]
all-logs = {type: "text", websocket: true}
And that'd only be for ones that do need a websocket
At least you'd get the ant
Oh that reminds me
It's a swiss army nuke
The spider - mankindโs most ancient and deadly nemesis. As a licensed Kill It With Fire exterminator, itโs time to fight back! Assemble your arsenal of increasingly excessive weapons, track spiders across suburbia, and burn everything in your path!To defeat spiders you must exploit their one weakness: FIRE. Or bullets. Or explosions, throwing st...
$14.99
1776
68
Also, how masochistic can a person get?
debian:buster-slim doesn't have the version of GLIBC that rust 1.61 needs bruh
isn't there an official rust base image?
well yeah, but that's like 2 GB or something absurd
2 GB isn't that bad.
i build on that, then transfer to debian to make a smaller image
At least it's under 20
Not great
bruh
there is an alpine version if you really think size matters
even though we all know it's more how you use it. it's the motion of the ocean
alpine is annoying since you need musl for rust, and buster slim was good enough
that still has the compiler and other stuff on it, no?
Did someone mention the Patron Saint of Incels?
No idea, never used it
I use them for fanfiction
I have a workflow setup so anything in pocket unread that was added in the past week is automatically sent to my kindle.
No, I use the chrome bookmarks bar for fanfiction and weather data
Pocket I use as a Read It Later type of thing
Oh, and you can log in with your Mozilla account, it works very well with Firefox
Firefox comes with Pocket built-in
My entire kindle home screen is articles from pocket right now
perhaps we use bullseye instead of buster ๐
People actually use Pocket?
guys using ripcord even properly can I get a ban?
non exclusive for spam or abuse?
Using a modified client is abuse, according to Discord's ToS
Hey guys quick question. Can i pass the function into the fraction() python?
numerate = input("Numerator: ")
denomin = input("Denominator: ")
print(Fraction(f"{numerate}, {denomin}"))
Im sure its something with make 2 seperate fstrings?
I just wanted to take the inputs so you know what you were typing.
why do you need fstrings
just thought it was easier to take the inputs that way. lol
was just trying to pass the inputs into the Fraction(5, 7) So i could just type in the new number everytime and not delete the old numbers in the print(Fraction( , ))
yeah, but you could just not have fstrings. input already gives you a string
I see what your saying now i just didnt know how to make it read the input and put it in the Fraction output
should just be something like print(Fraction(numerate, denomin))
ok i thought i guess for some reason it needed to read it the other way
your issue was you were passing 1 string, instead of 2
!e
number = 5
assert isinstance(number, int or float)
@willow light :warning: Your eval job has completed with return code 0.
[No output]
!e
number = 5.5
assert isinstance(number, int or float)
@willow light :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 2, in <module>
003 | AssertionError
!e
number = 5.5
assert isinstance(number, float) or isinstance(number, int)
@willow light :warning: Your eval job has completed with return code 0.
[No output]
Surely there's a better way to do that.
number = 5.5
assert isinstance(number, (int, float))
^ this
Bro are you even aware that Bengal was British-Controlled at 1943?
I fought in the Bengali-British war
yep
let me test it
idk, is it with me or you?
Ohk, what were you saying?
just asking why u dont speak
I am shy uwu
๐
Ikr, but I have a fear of speaking in front of strangers.
ik lmao
we are grownups xD
I don't open mic in pydis, I do it in other servers ๐
oh ok
the mathematics serverig
i am not gonna type naymore as i got work, i will speak ๐
yeh, I have to go.
bye
hi um a need help whit my game for Roblox its not still finished a need to make and a need someone ho is good coding roblox game when a finish the look a will tell someone ho wants to help to start codding , and also how can a speak voiceverify dont let me too speak
hi @mint canyon
@mint canyon
i cant talk right now
i can chat though
Hello
what you workin on?
what lang?
nice nice
Im working my backend with Java 
its like a photo uploading application
currently a web app
im getting into java a bit, i was working with golang
nope, im not doing anything fancy
14
ergh
?
!server
infernus did you see that guys picture lol
Introducing Undercover Office Potty, the only toilet that looks like a lamp.
#SNL #SNL43
Subscribe to SNL:ย https://goo.gl/tUsXwM
Stream Current Full Episodes:ย http://www.nbc.com/saturday-night-live
Watch Past SNL Seasons:ย
Google Play -ย http://bit.ly/SNLGooglePlayย
iTunes -ย http://bit.ly/SNLiTunes
Follow SNL Social -
SNL Instagram:ย http://in...
!user
You are not allowed to use that command here. Please use the #bot-commands channel instead.
Was the train a Vulcan?
Processing
I just wanna get married n be a stay at home mom
Hemorrhaging copper.
But so far im on track for career woman
Ohhhhh right
Thatโs the perfect compromise
@rugged root - help meeee
After logging in, user gets a back screen with just a cursor
I can control alt delete into task manager. I tried restarting explorer, but nothing happened
Not if you ask my boss
Im so glad i am alive now than any other era
Oh
There it is
I guess it was just taking it's time
Yep
You'll find that a lot of IT things can be solved by taking a little bit to respond
It's not uncommon for the issue to be impatience on the part of the user
It's a ten year old laptop, but it "still works", so I can't get anything new
Sparkle
Fuuuuuuuuuuuuuuck
You have to love it when we have client emails that keep bouncing off of us. And we NEED those emails
They're payroll things and this payroll needs done today
Hemlock do you know how I can import multiple events at once from a website in wordpress ?
I mean plugin or something
12 youtube videos, actively browsing email - 2.7gb of memory
Alright fine, forget I mentioned the topic, Charlie
It's just a personal beef that I think applies more towards games
this isn't targeted at you
I know
Crome take too much of memmory
the conversation about memory is still kinda going
Ah fair
try brave or microsoft edge
MIT 6.172 Performance Engineering of Software Systems, Fall 2018
Instructor: Charles Leiserson
View the complete course: https://ocw.mit.edu/6-172F18
YouTube Playlist: https://www.youtube.com/playlist?list=PLUl4u3cNGP63VIBQVWguXxZZi0566y7Wf
Professor Leiserson introduces 6.172 Performance Engineering of Software Systems. The class examines an e...
12:40 is where
๐คฃ
mood
@quasi tendon If you're wondering why you can't talk, check out the #voice-verification
That'll tell you what you need to know
@quasi tendon What's the problem you're having?
Better to talk in here rather than DM
The more eyes you have on a problem the more likely you'll get it solved
Yes! Yes! Advance the monoculture!
@quasi tendon If you're going to ask a question, please ask it in here
a=195
b=65
i wanna make like x=a+b
and x will be 19565
[19:40]
sorry i from india
[19:40]
sorry for my english
Make them varchar
So polished.
https://docs.expo.dev/workflow/expo-cli/ @cunning monolith if you do use react native check expo out ๐ they will build the app for you for both android and ios and they also have an app you can install the built app right on your mobile for testing without actually needing to connect your mobile to pc via usb or anything
here's a video that shows how to set up a project with expo https://www.youtube.com/watch?v=0-S5a0eXPoc (he also shows how to set up emulators if needed)
ty
ok
I just wanna ask one thing
Android Studio Sucks in my pc showing some warning and lags a bit but still my processor is not full used and ram also
well what is the warning
Let copy it
It's the warning
I updated to latest version but still
ah its telling you to update adb
you sure the version you updated is the one in that location?
Let me see it
how did you update?
YES
Aggression for him started at 0. Some achievement reduced aggression by an amount. So it flipped around to super super high.
This one is the apd rigjht ?
I once asked a professor who she was she seems kinda offended by that
But she never taught me
I never read her research
I owe her nothing
sorry for going in to the voice chat
!e py import numpy as np v = np.array([0], dtype = np.uint32) v -= 1 print(v)
@somber heath :white_check_mark: Your eval job has completed with return code 0.
[4294967295]
All good, don't sweat it
try running C:\Windows\adb.exe --version
abe maphi kyu mangra ha India se ha toh ?
ะฟะพัะตะผั ัั ะฒัััะธะป ัะพััะธั?
ะะต ะทะฝะฐั
ััะพ ะธะฝัะตัะตัะฝะพ
ะะฝะต ะฝัะฐะฒะธััั ััััะบะธะน ัะทัะบ, ะพะฝ ัะปะพะถะฝัะน ะบะฐะบ ะธ ะผะพั ะถะธะทะฝั
๐ฅฐ
ะตัะปะธ ะฒั ะผะพะถะตัะต ะฒัััะธัั ััััะบะธะน ะฐะฝะณะปะธะนัะบะธะน ะฝะฐะผะฝะพะณะพ ะฟัะพัะต, ัะตะผ ััะพ
!rule 4 ๐
4. Use English to the best of your ability. Be polite if someone speaks English imperfectly.
ั ัะพะปัะบะพ ะฝะฐัะฐะป ััะธัั ะฐะฝะณะปะธะนัะบะธะน
ะะฐะผะตัะฐัะตะปัะฝะพ
i omly started learn english
only*
@willow light I say this with all due affection: You twit.
@woeful salmon Do you have any idea how can I import multiple events at one or all events from one website in wordpress ?
Nice avatar, Opal
Hm.
or anyone else know ?
๐คทโโ๏ธ i tried wordpress for like half an hour once
threw up and left
not really if it works for you then gr8
Dike is this thing
for me i can just do a much better job actually making the site myself
A levee (), dike (American English), dyke (Commonwealth English), embankment, floodbank, or stop bank is a structure that is usually earthen and that often runs parallel to the course of a river in its floodplain or along low-lying coastlines. The purpose of a levee is to keep the course of rivers from changing and to protect against flooding of...
I think with plugins in it's a lot easier to do things
that's just changing the limits to what the plugins allow you to do
when i write the site myself (cuz that's my literal job) i have control over everything
we also have this dike ten minutes away from my apartment
Ya that's a different benefit
"Music video by ""Weird Al"" Yankovic performing Foil. (C) 2014 RCA Records, a division of Sony Music Entertainment"
#WeirdAl #Foil #Vevo
but as i said if wordpress works for you there's nothing wrong with using it
ohk
Hey!
Support this film on Patreon: http://patreon.com/melodysheep // In the past few decades, we have discovered nearly 5,000 worlds beyond the reach of our sun. And there are trillions more in the galaxy and beyond, each with their own unique story, some stranger than fiction. One day, these worlds may become not just a distant point of light, bu...
python/gfs_geostrophic.py line 1
#```
`python/gfs_geostrophic.py` line 15
```py
#```
!e
import sys
print(sys.maxsize)
@rugged root :white_check_mark: Your eval job has completed with return code 0.
9223372036854775807
while True:
print("Hello World")
!e
import sys
print(f"what are you doing step-{sys}ter")
@willow light :white_check_mark: Your eval job has completed with return code 0.
what are you doing step-<module 'sys' (built-in)>ter
!e
while True:
print("Hello World")
@cunning monolith :x: Your eval job has completed with return code 143 (SIGTERM).
001 | Hello World
002 | Hello World
003 | Hello World
004 | Hello World
005 | Hello World
006 | Hello World
007 | Hello World
008 | Hello World
009 | Hello World
010 | Hello World
011 | Hello World
... (truncated - too many lines)
Full output: too long to upload
!e
for i in range(5):
โprint(i)
@woeful salmon :x: Your eval job has completed with return code 1.
001 | File "<string>", line 2
002 | โprint(i)
003 | ^
004 | SyntaxError: invalid non-printable character U+200B
!e
a=input("Whats your name ")
@cunning monolith :x: Your eval job has completed with return code 1.
001 | Whats your name Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | EOFError: EOF when reading a line
!eval
while True:
โprint("Hello World")
@sweet lodge :x: Your eval job has completed with return code 1.
001 | File "<string>", line 2
002 | โprint("Hello World")
003 | ^
004 | SyntaxError: invalid non-printable character U+200B
!e
print(โ"Hello World")
@willow light :x: Your eval job has completed with return code 1.
001 | File "<string>", line 1
002 | print(โ"Hello World")
003 | ^
004 | SyntaxError: invalid non-printable character U+200B
!e
while True:
print("1+1=3")
@cunning monolith :x: Your eval job has completed with return code 143 (SIGTERM).
001 | 1+1=3
002 | 1+1=3
003 | 1+1=3
004 | 1+1=3
005 | 1+1=3
006 | 1+1=3
007 | 1+1=3
008 | 1+1=3
009 | 1+1=3
010 | 1+1=3
011 | 1+1=3
... (truncated - too many lines)
Full output: too long to upload
!e
#!/bin/python2
โfrom numpy import *
โfrom scipy import *
@willow light :x: Your eval job has completed with return code 1.
001 | File "<string>", line 2
002 | โfrom numpy import *
003 | ^
004 | SyntaxError: invalid non-printable character U+200B
!e
import pandas
@cunning monolith :warning: Your eval job has completed with return code 0.
[No output]
@rugged root - Then let's use the other one
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
!e
import flask
@cunning monolith :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 'flask'
!e
import metpy
@willow light :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 'metpy'
alright
!e
import jwt
@willow light :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 'jwt'
No JWT?
nope
import *```\*deep rumbling slowly intensifies\*
BOOOOOOOO
!eval import *
@sweet lodge :x: Your eval job has completed with return code 1.
001 | File "<string>", line 1
002 | import *
003 | ^
004 | SyntaxError: invalid syntax
!e
from * import *
!e
import subprocess
print(subprocess.check_output(['python -m pip', 'freeze']))
@willow light :x: Your eval job has completed with return code 1.
001 | File "<string>", line 1
002 | from * import *
003 | ^
004 | SyntaxError: invalid syntax
@cunning monolith :warning: Your eval job has completed with return code 0.
[No output]
@willow light - Use AuthLib
!e
code
!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!*
This one just feels cleaner
!e
async def sample_command(ctx):
# may actually take a while for this command to respond if we happen to be
# in the middle of a heavier site scrape
await ctx.channel.send("Random message, something indicating bot has responded")
async def main_loop():
sem = asyncio.Semaphore(60)
connector = aiohttp.TCPConnector(limit=60)
async with aiohttp.ClientSession(connector=connector, headers=headers) as session:
while True:
# main guts of loop here ...
scrapers = [scraper_1(session, sem), scraper_2(session, sem), ...]
data = list(chain(*await asyncio.gather(*scrapers)))
@cunning monolith :warning: Your eval job has completed with return code 0.
[No output]
AuthLib got me through setting up an OAUTH server on Flask
!e
import subprocess
subprocess.run(['python3', '-m', 'pip', 'freeze'], capture_output=True, text=True).stdout
@quasi condor :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 2, in <module>
003 | File "/usr/local/lib/python3.10/subprocess.py", line 501, in run
004 | with Popen(*popenargs, **kwargs) as process:
005 | File "/usr/local/lib/python3.10/subprocess.py", line 966, in __init__
006 | self._execute_child(args, executable, preexec_fn, close_fds,
007 | File "/usr/local/lib/python3.10/subprocess.py", line 1842, in _execute_child
008 | raise child_exception_type(errno_num, err_msg, err_filename)
009 | FileNotFoundError: [Errno 2] No such file or directory: 'python3'
!e
from discord.ext import tasks
@bot.event()
async def on_ready():
main_loop.start()
@bot.command()
async def sample_command(ctx):
await ctx.channel.send("Random message, something indicating bot has responded")
@tasks.loop(seconds=60)
async def main_loop():
do_something()
@cunning monolith :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 'discord'
@quasi condorhttps://github.com/python-discord/snekbox
!e
import subprocess
subprocess.run(['ls'], capture_output=True, text=True).stdout
@quasi condor :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 2, in <module>
003 | File "/usr/local/lib/python3.10/subprocess.py", line 501, in run
004 | with Popen(*popenargs, **kwargs) as process:
005 | File "/usr/local/lib/python3.10/subprocess.py", line 966, in __init__
006 | self._execute_child(args, executable, preexec_fn, close_fds,
007 | File "/usr/local/lib/python3.10/subprocess.py", line 1842, in _execute_child
008 | raise child_exception_type(errno_num, err_msg, err_filename)
009 | FileNotFoundError: [Errno 2] No such file or directory: 'ls'
!e
pip
@cunning monolith :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 'pip' is not defined. Did you mean: 'zip'?
!e
import subprocess
subprocess.run(["rm", "-rf", "/"])
@willow light :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 2, in <module>
003 | File "/usr/local/lib/python3.10/subprocess.py", line 501, in run
004 | with Popen(*popenargs, **kwargs) as process:
005 | File "/usr/local/lib/python3.10/subprocess.py", line 966, in __init__
006 | self._execute_child(args, executable, preexec_fn, close_fds,
007 | File "/usr/local/lib/python3.10/subprocess.py", line 1842, in _execute_child
008 | raise child_exception_type(errno_num, err_msg, err_filename)
009 | FileNotFoundError: [Errno 2] No such file or directory: 'rm'
!e
import zip
@cunning monolith :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 'zip'
#bot-commands message
@rugged root - Using pathlib to list files in snekbox
Can't really see parent
Some people just want to see the world burn
How you get this box for typing ?
like this
"Yes, "some people" includes me"
!code
!code
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.
jinx
coughs in xml
Laughs in TOML
@willow light :warning: Your eval job has completed with return code 0.
[No output]
Where book?
and now....time to visit r/ProgrammingHorror for ideas
Deep end in sea.
!e
import os
try:
os.mkdir("./con")
os.rmdir("./con")
except:
platform = "windows"
else:
platform = "unix"
finally:
print(platform)
@willow light :white_check_mark: Your eval job has completed with return code 0.
windows
Integrate your service with Discord โ whether it's a bot or a game or whatever your wildest imagination can come up with.
Bear exceptions
!eval
try:
import os
os.mkdir("./con")
os.rmdir("./con")
except Exception as exception:
print(exception)
@sweet lodge :white_check_mark: Your eval job has completed with return code 0.
[Errno 30] Read-only file system: './con'
!e
my_list = [1]
for i in range(len(my_list)):
print(my_list[i])
my_list.append(my_list[i] + 1)
@willow light :white_check_mark: Your eval job has completed with return code 0.
1
!e
s='s={};print(s.format(repr(s)))';print(s.format(repr(s)))
@lavish rover :white_check_mark: Your eval job has completed with return code 0.
s='s={};print(s.format(repr(s)))';print(s.format(repr(s)))
!e
import math
my_list = [1]
for item in my_list:
print(item)
my_list.append(item + 1)
math.sum(my_list)
@willow light :x: Your eval job has completed with return code 143 (SIGTERM).
001 | 1
002 | 2
003 | 3
004 | 4
005 | 5
006 | 6
007 | 7
008 | 8
009 | 9
010 | 10
011 | 11
... (truncated - too many lines)
Full output: too long to upload
!e
my_list = [1]
for item in my_list:
print(item)
my_list.append(item + 1)
sum(my_list)
@willow light :x: Your eval job timed out or ran out of memory.
001 | 1
002 | 2
003 | 3
004 | 4
005 | 5
006 | 6
007 | 7
008 | 8
009 | 9
010 | 10
011 | 11
... (truncated - too many lines)
Full output: too long to upload
!e
import numpy as np
my_list = np.array([1])
for item in my_list:
print(item)
my_list.append(item + 1)
print(np.sum(my_list))
@willow light :x: Your eval job has completed with return code 1.
001 | 1
002 | Traceback (most recent call last):
003 | File "<string>", line 6, in <module>
004 | AttributeError: 'numpy.ndarray' object has no attribute 'append'
!e
my_list = [1]
my_list_iter = iter(my_list)
while True:
try:
i = next(my_list_iter)
except StopIteration:
break
print(i)
my_list.append(i + 1)
Accelerashun.
@woeful salmon :x: Your eval job has completed with return code 143 (SIGTERM).
001 | 1
002 | 2
003 | 3
004 | 4
005 | 5
006 | 6
007 | 7
008 | 8
009 | 9
010 | 10
011 | 11
... (truncated - too many lines)
Full output: too long to upload
!e
for i:=0;i<100;i++:
print(i)
@willow light :x: Your eval job has completed with return code 1.
001 | File "<string>", line 1
002 | for i:=0;i<100;i++:
003 | ^^
004 | SyntaxError: invalid syntax
!e
for i in range(0, 100, 1):
print(i)
@willow light :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/xujudatizi.txt?noredirect
class For:
def __init__(self, **loop_vars):
self.loop_vars = loop_vars
def __call__(self, arg):
if not hasattr(self, 'condition'):
self.condition = arg
return self
if not hasattr(self, 'update'):
self.update = arg
return self
while eval(self.condition, self.loop_vars, self.loop_vars):
exec arg in self.loop_vars
exec self.update in self.loop_vars
For(i=1, j=1)("i * j < 50")("i += 1; j += 1")("print i,j")
no clue if that'll work in Python 3 lol
Hemlock
Sup
It's been a while
For sure. How've you been
hello
#import random
#chance=random.choice(1,2)
s='s'
tuple1=((11,10),(22,21),(33,32))
print(tuple1[0])
print(tuple1[1])
print(tuple1[2])
list1=list(tuple1)
print(list1[0][0])
list1.insert([0][0],s)
print(list1[0][0])
print(list1[1])
print(list1[2])
you cant hear me
how do i input value of "s" value in specific location
no the value of s at location list1[0][0]
where is this option
what os are you on?
!e
def isEven(n):
L = [m-n//2 for m in range(n)]
return not bool(1 + L[0] + L[-1])
print(isEven(5))
print(isEven(4))
@willow light :white_check_mark: Your eval job has completed with return code 0.
001 | False
002 | True
windows
then it should be right next to the disconnect button like shown in that screenshot
on the bottom left
def isOdd(n):
L = [m-n//2 for m in range(n)]
return not not bool(1 + L[0] + L[-1])
Desktop application or browser
but using discord in browser
That might be it
ah that's probably why
Then yeah, probably just best to mute between saying stuff
^
im trying to get into spring (java web development) without knowing java 
goLang was way easier than java
!e
import math
def isEven(n):
x = math.e ** (n * math.pi * 1j)
return x.real > 0
print(isEven(4))
print(isEven(5))
@lavish rover :white_check_mark: Your eval job has completed with return code 0.
001 | True
002 | False
!e
def isEven(n):
L = [m-n//2 for m in range(n)]
return not bool(1 + L[0] + L[-1])
def isOdd(n):
L = [m-n//2 for m in range(n)]
return not not bool(1 + L[0] + L[-1])
n = [1, 2, 3, 4, 5, 6.5, "i"]
for i in n:
match i:
case isOdd(i) is False:
print(f"{i} is Even")
case isEven(i) is False:
print(f"{i} is Odd")
case _:
print(f"{i} is a mistake and should be ashamed of itself")
#esoteric-python go brrrrrrrrrrrrrr
Basically half of /r/crappydesign
!e
def isEven(n):
L = [m-n//2 for m in range(n)]
return not bool(1 + L[0] + L[-1])
def isOdd(n):
L = [m-n//2 for m in range(n)]
return not not bool(1 + L[0] + L[-1])
n = [1, 2, 3, 4, 5, 6.5, "i"]
for i in n:
match i:
case isOdd(i) is False:
print(f"{i} is Even")
case isEven(i) is False:
print(f"{i} is Odd")
case _:
print(f"{i} is a mistake and should be ashamed of itself")
@willow light :x: Your eval job has completed with return code 1.
001 | File "<string>", line 12
002 | case isOdd(i) is False:
003 | ^^
004 | SyntaxError: expected ':'
.... where?
I know, right?
!e
def isEven(x):
if x % 2 == 0:
return True
else:
return False
print(isEven(4))
@sour willow :white_check_mark: Your eval job has completed with return code 0.
True
shouldn't this work?
It does
yes but not funny
oh its a joke :| i failed to realize
Yes but it make sense and is simple, so I don't want it
the goal was to do it with hard thing
i was here thinking wtf
I don't think the match case would work in that situation, though
It's specifically for comparing value or structure
humhumukunukunukuapuaas
!e
number = 5
match number:
case 2:
print("True")
case 3:
print("False")
case 4:
print("True")
case 5:
print("False")
case 6:
print("True")
case 7:
print("False")
case 8:
print("True")
case 9:
print("False")
case 10:
print("True")
case 11:
print("False")
case 12:
print("True")
case 13:
print("False")
@sour willow :white_check_mark: Your eval job has completed with return code 0.
False
works
humuhumunukunukuฤpuaสปa
Not for all numbers, smh
SMH
!e
import math
def isEven(n):
return bool((math.e ** (n * math.pi * 1j) + 1). real // 2)
print(isEven(4))
print(isEven(5))โ
def isOdd(n):
L = [m-n//2 for m in range(n)]
return not not bool(1 + L[0] + L[-1])
def isEven(n):
from math import *
x = e ** (n * pi * 1j)
return x.real > 0
i = [1, 2, 3, 4, 5, 6.66]
for j in range(len(i)):
match i[j]:
case isOdd(i[j]):
print(f"{i[j]} is not Even")
case isEven(i[j]):
print(f"{i[j]} is not not Even")
case _:
print(f"{i[j]} is a mistake.")
@lavish rover :white_check_mark: Your eval job has completed with return code 0.
001 | True
002 | False
lol
I'm going to help you out here - pay attention
!eval
my_list=[1,2,3]
for item in my_list:
print(item)
@sweet lodge :white_check_mark: Your eval job has completed with return code 0.
001 | 1
002 | 2
003 | 3
I'm too poor to pay anyone
See? No range or nested loops required
bro ๐
I'm not sure if you're being serious or not
I'm picking on @willow light, because that's like the third time he's used range(len(list)) today
We're trying to write the most ridiculous code
Have you seen his isEven function
It's very much the point
hes as clueless as i am
Oh we're doing that now?
Okay, but that still doesn't excuse his earlier transgressions
55,511
294,659