#voice-chat-text-0
1 messages · Page 6 of 1
Sure, the project is to automate terrascan on my terraform code project so it detects any vulnerabilities within the code.
I have written a simple code that executes and takes input of the environment and project folder. No errors currently but I need to add some validations and as well as defining which terraform project to use and how to use it ect
😭
Is my first time using and learning python so needed some guidance on that
I'm not familiar with terraform.
can you have look at 10 second at video 2:20 - 2:30
https://www.youtube.com/watch?v=XIUn03p8fkY
and let me know if I should try this ?
DISCLAIMER: Please consult a technician if you have a hard drive with delicate data.
- Get genuine Windows keys at 𝑷𝒓𝒊𝒎𝒆 𝑻𝒆𝒄𝒉 𝑴𝒂𝒓𝒕, Use ET20 for 20% OFF! links below:
✅ Windows 10 Pro key: https://bit.ly/32EkTqY
✅ Windows 11 Pro key: https://bit.ly/31jyHdg
✅ Office Pro Plus 2019: https://bit.ly/2YK1SlS
✅ Office 2021 Pro Plus key: https://bit....
Doesn't need someone to BE familiar with terraform
I don't need to look to have a good guess at no.
Well, if you're dealing with files and folders, pathlib is usually the go.
But given I'm not familiar with the design patterns surrounding terraform, that might be the wrong thing to suggest here.
And that's why I don't rely on hard drivers anymore. All my data is on ssd and I only keep less important files on hdd
actually it slow crashed by oscilating it just touched it and it happened not even droped or fallen with high velocity
Also I wouldn't recommend opening a hardrive
I basically have the logic but can't figure out how to relay that into the python code
what else can I do any suggestion ?
tkinter has some file/folder selection interface stuff.
Cuz the arm holding the read and write header over the disc only hover overs by few micrometers
what should I do
Any human interaction with the arm and u have chance of somehow scratching the surface of the disc
Go to a hardware center where they do data recovery
:v u do need to pay them to recover data for u hehe
I guess would be worth sharing with an expert or better than me ?
Or u could try connect the HDD to a computer with a separate operating system already running on a different drive
actually that hard drive is not mine its of my elder brother and if he need it tomorow i will be gone
how can this solve that ?
probably in the live-coding channel
U might be able to open the contents on the hard drive to backup files
It doesn't solve it. Its one of the ways of retrieving data
@somber marlin Have you seen #❓|how-to-get-help ?
can you explain it a bit more
which operating system ?
R u using that HDD as boot drive
no external hard drive
Yes but that doesn't help much
:v oh welp can't help with that then. U might wanna go to a data recovery center then and talk to a data recovery expert
it stopped after it slightly touched a table oscillated by wire
ok😭
Probably moved inner components then.
Ya guess so
:v well u r kind of doomed then
: )
I got a 9 year HDD idk how it's still working xD
Must have been good quality
those die too
I have 12 year one connected in laptop
Not as often as hdd
hard drives typically give some warning they're going to fail
SSDs, however, die all at once
I am thinking to perform a operation after 3-4 hours any one wanna join ?
Nah I wouldn't recommend opening up ur HDD. It's really delicate inside
actually I opened some waste hardrive
And then?
they are waste I destroyed them with hammer
O-o bro u r trying to fix it not sledge it with hammer
It's not about if u can open it. It's about if u close it back up without messing things up and damaging components like the read/write header
actually I dont need to deal with those
Wat r u gonna do then?
just have 10 sec look here from 2:20-2:30
U r gonna move the disc inside the HDD. Ok
it seems ok ?
@cunning monolith do not open your hard drive unless you are never going to use it again
the dust from the air will probably already damage it
ok
any suggestion what should I do ?
ok
is there any important data on the drive?
yup little bit
30-40$
not sure if they'll do it for that
which city are you in?
india delhi
lemme check
It's should be cheaper in India
yup
hahahah the car caught fire near here and they called the truck that clean the gutter instead of the fireman, they got sewage in the car to put out the fire
kkkkkkkkkkkk
can't find any companies which do it for that price
and anyway all the companies I found looked like scams
on quora someone written in india hyderabad it costed $160 for 2tb
I will try to go to some computer shop market
whn i connect computer give sounds it connected
it seems to be beeping
is this an external usb drive?
yup
ohhhhh
🦜
also I assume you tried it in a different usb port
yup
do you mean m3 2tb
do you have a laptop or a desktop
desktop
do you have a spare sata port
yes
with a bit of luck it might work if you take the hard drive out of the usb enclosure and plug it directly in the sata port
making sure to leave the hard drive itself closed so no dust gets in
I will try this but it stopped after slowly crashing on table
lemme first check if it even has a sata port
ok
More info about this fix You can find on my webstie: https://frostytech.eu/en/complete-disassembly-and-fix-maxtor-m3/
Screwdriver: Five-pointed star 1.2 and Torx T6.
My disk fell on the floor and then did not want to run.
When I tried to start the disk, I only heard the beeping noise.
It's probably the motor is trying to start the platters and...
if you follow this up to 1:15
but no further!
you can then connect it to a sata port
it's worth a try
mount it read-only
if it doesn't work you mean?
ya
toss it
operation ?
you're not getting it fixed for 60
how much will I get it fixed for ?
probably the read write head will need replacing
which needs a cleanroom and special tools
which is expensive
in the usa cheapest one I found is in Florida; 380 dollars
and even with the head replaced it still might not work
all forms of storage die eventually
it's just a fact of life
only solution is to have multiple backups of everything
I think operation is last option
operation?
DISCLAIMER: Please consult a technician if you have a hard drive with delicate data.
- Get genuine Windows keys at 𝑷𝒓𝒊𝒎𝒆 𝑻𝒆𝒄𝒉 𝑴𝒂𝒓𝒕, Use ET20 for 20% OFF! links below:
✅ Windows 10 Pro key: https://bit.ly/32EkTqY
✅ Windows 11 Pro key: https://bit.ly/31jyHdg
✅ Office Pro Plus 2019: https://bit.ly/2YK1SlS
✅ Office 2021 Pro Plus key: https://bit....
what do you mean with that
2:20-22:30
oh
2:20-2:30
well, if it doesn't work with direct sata mounting you may as well try that
since it'll be as good as dead anyway
why ?
for the reasons I listed earlier
ohh
you're not gonna have a company fix it for an affordable price
I think I should go to tech market near me there the $25-$30 is fairly decent for any repair
so take off the usb enclosure like in the video I sent you up to 1:15 only
then try mounting it via sata, read-only
(you might have to restart for that)
and if that doesn't work do what you want
you think they have a cleanroom?
ok 👍
I dont know
ok
afterwards it'll just be a standard sata hard drive so you can take it to them like that
I have a decent cleaned room will turn of fans
you don't need a clean room for taking off the usb enclosure
with cleanroom I mean a room entirely sealed off with professional dust extraction system so there isn't a single speck of dust in the air anywhere
ok for opening i am saying
ok can ac do that ?
no
ok
you can't do it without a custom-built room
I mean, you're also full of dust
your chair is full of dust
your vacuum sends out lots of dust
etc
yes you are right
but do you think these guyz are having clean room ?
professional data recovery services will have a cleanroom
I don't know how professional these people are
ok
Thanks for the solution I will try it
good luck!
I had 3 hard drives fail about 9 months ago
it was no fun
so I do feel your pain
hello 🙂
why cant i talk
!voice
Voice verification
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
dnd?
dngeons and dragons
😭
But in mine it's of my elder brother
If mine trick worked you should also give them a try
!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.
Hey @hollow osprey!
It looks like you tried to attach a Python file - please use a code-pasting service such as https://paste.pythondiscord.com
def calculate_quarters():
quarters = 0
n_cents = quarters
n_cents = get_cents()
for i in range(n_cents):
n_cents = n_cents / 0.25
if quarters >= 0:
print("Owed: ", float(n_cents), "coins")
return quarters
if n_cents != quarters:
return calculate_dimes
def calculate_dimes():
dimes = 0
n_cents = dimes
n_cents = get_cents()
for i in range(n_cents):
n_cents = n_cents / 0.1
print("Owed: ", float(n_cents), "coins")
if dimes >= 0:
return dimes
if n_cents != dimes:
return calculate_dimes
def calculate_nickels():
nickels = 0
n_cents = nickels
n_cents = get_cents()
for i in range(n_cents):
n_cents = n_cents / 0.05
print("Owed: ", float(n_cents), "coins")
if nickels >= 0:
return nickels
if n_cents != nickels:
return calculate_pennies
def calculate_pennies():
pennies = 0
n_cents = pennies
n_cents = get_cents()
for i in range(n_cents):
n_cents = n_cents / 0.01
print("Owed: ", float(n_cents), "coins")
if nickels >= 0:
return pennies
if n_cents != pennies:
return calculate_pennies
def get_cents():
while True:
try:
n = int(input("Cents owed: "))
if n < 0:
return calculate_quarters
if n == 0:
print ("you don't need coins.")
break
elif n > 0:
break
except ValueError: print("must be a int")
return n
calculate_quarters()
```py
I want join vc
c'mon 🙂
But at hotel restaurant
sad
I mean you can still listen in
Had to leave
Sounds good
?
I have some stuff I have saved to talk about!
i sucks sry
so i use this ?
user_input = input()
user_float = float(user_input)
but before
?
!e
print(1 + 2.0)
@rugged root :white_check_mark: Your 3.11 eval job has completed with return code 0.
3.0
😂 ahahah
ayyye cs50 ✌️ im on the last pset
it's not working
gg ❤️
!eval
while True:
print("Hemlock Loves Butterfly")
@cunning monolith :x: Your 3.11 eval job has completed with return code 143 (SIGTERM).
001 | Hemlock Loves Butterfly
002 | Hemlock Loves Butterfly
003 | Hemlock Loves Butterfly
004 | Hemlock Loves Butterfly
005 | Hemlock Loves Butterfly
006 | Hemlock Loves Butterfly
007 | Hemlock Loves Butterfly
008 | Hemlock Loves Butterfly
009 | Hemlock Loves Butterfly
010 | Hemlock Loves Butterfly
011 | Hemlock Loves Butterfly
... (truncated - too many lines)
Full output: too long to upload
Join the official CS50 discord's server , you can get much better help there
you can find the link on their website
how did you deal w/ it?
the question or the server ?
question bro
i'm not sure what's the error , use the check50 command to find your error
the error is that i can't use float number as int
for the calculation
no cause shit of honesty
well how can you use that
Supp ppl
float is like 10.00 something that's different data type but integer is another datatype which deals with integers like -1,1,2 etc
help😅
Help in ?
Hello
Which language?
HI bro
You are Amir
The parrot is back from the dead bringing countless new insults for your disposal, Sir! Remember that silly game that parted lovers, destroyed families and turned friends into enemies? Here’s its successor that does even more, certainly with more style and more variety. And I have proof! This time you can spread affront to everyone in the world ...
$1.99
2974
64
Left4Dead is pretty relaxing, at least to me
!source
☕
@ebon junco #unit-testing will end up knowing more than I can offer in a reasonable amount of time
@rugged root - I will check in that channel
@cunning monolith https://github.com/gamingbuddhist/VanScape
@gentle flint that sata mounting didn't worked 😭
tfw you don't know how to find all substrings from a string
Hello @whoever said that
substrings = []
for i in range(len(s)):
for j in range(len(s)):
substrings.append(s[i:j])
return substrings
tfw this doesn't work
gtg, interesting talk.
@round cedar Your audio is severely fragmenting.
Like you have a poor wifi or something.
Hm.
It might be my connection.
It is raining here.
Rain can sometimes screw with the internet.
:u oh
@robust quiver I didn't hear any of that, but I think it's possibly me.
I can hear fine, now.
ctrl-r
Voice verification
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
!voice
Voice verification
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
FALSE
&&
(
TRUE
||
TRUE
)
|
TRUE
&&
TRUE
I'm confused.
FALSE and ( TRUE or TRUE ) or TRUE and TRUE
!e py print(False and (True or True) or True and True)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
True
I've seen a trick with "banana"
nan Not a number
The stringification of the returns
Well you just said you were dealing with strings.
In computer science, an operator precedence parser is a bottom-up parser that interprets an operator-precedence grammar. For example, most calculators use operator precedence parsers to convert from the human-readable infix notation relying on order of operations to a format that is optimized for evaluation such as Reverse Polish notation (RPN)....
!voice
Voice verification
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
@dull oasis here
!voice
Voice verification
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
hello @somber heath
Hello @cunning monolith
Hi
whta rae you working on?
currently nothing just installing arch linux
oh ok, i was working on a hangman project
@fickle crater why you kept him hanging like that
😂
see what i did there
puns not allowed @robust quiver
jk
Xd
for sure
i am newbie here
ohh i need to chat at least 50 message and more roles
KK thanks dude
have a good day, yeah thanks dude 🙂
i wanna ask you guys a tip
I need help.
Can you help me? I wanna be able to speak.
@zenith radish @somber heath
!voice
Voice verification
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
That's for three days
I need help now.
I only just joined.
Gimme a sec
ValueError: File format b'\x93NUM' not understood. Only 'RIFF' and 'RIFX' supported.
It's Google Colab
The code wouldn't work otherwise without the wavs being converted to npy
I didn't make the code.
I only am trying to run it.
Yes, it's google colab.
Both the wavs and npy are in a set folder, the gta spectrograms are being made based on a checkpoint.pt file
I think.
How would I be able to make it in the correct format? It said something about only RIFF and RIFX being supported.
Divide and conquer.
!e [print(i) for i in range(1, 12)]
@terse needle :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 1
002 | 2
003 | 3
004 | 4
005 | 5
006 | 6
007 | 7
008 | 8
009 | 9
010 | 10
011 | 11
@lavish rover
cursed uses of list comps
!e [print(i) for i in range(1, 112)]
@ebon sandal :white_check_mark: Your 3.11 eval job has completed with return code 0.
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: https://paste.pythondiscord.com/ujusegezat.txt?noredirect
!e print("```")
@terse needle :x: Your 3.11 eval job has completed with return code 1.
001 | File "<string>", line 1
002 | \
003 | ^
004 | SyntaxError: unexpected EOF while parsing
!e [print(i) for i in range(1, 12000000)]
@ebon sandal :x: Your 3.10 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 print(chr(96)*3)
@terse needle :white_check_mark: Your 3.11 eval job has completed with return code 0.
Code block escape attempt detected; will not output result
Full output: https://paste.pythondiscord.com/johifikopi.txt?noredirect
first_non_repeating_letter=lambda string:([s for s in string if string.lower().count(s.lower())==1]+[""])[0]
def first_non_repeating_letter(string):
if not string:
return ''
for c in string:
if string.count(c) == 1:
return c
return ''
Yeah lmao
🥲
Can u do that again?
🥲
pls
😕
That was cool
😳
def first_non_repeating_letter(string):
s = string.lower()
for i in range(len(s)):
if s.count(s[i]) == 1:
return string[i]
return ""
@ebon sandal yeah
def first_non_repeating_letter(string):
r = [c for c in string if string.lower().count(c.lower()) == 1]
return (r[0] if len(r) != 0 else '') if string else ''
def first_non_repeating_letter(string):
s = string.lower()
for (a, b) in zip(string, s):
if s.count(b) == 1:
return a
return ""
firstNonRepeatingLetter = s => (s.match(/(.)(?<!\1.+)(?!.*\1)/gi) || [''])[0]
idk if js/regex qualifies for this but still
check channel desc
you are in the wrong channel lad
i m not certain if you can see it cause like i dont have it visible on my end
the channel is hidden to people who already have voice-verified
[#voice-verification](/guild/267624335836053506/channel/764802555427029012/)
try typing this ^
yeah
@cunning monolith https://appcenter.elementary.io/com.github.donadigo.eddy/
@cunning monolith https://github.com/donadigo/eddy
@cunning monolith https://www.flatpak.org/setup/elementary OS
This is for windows application right ?
no
did you restart the pc after plugging the disk into your sata port
@lavish rover @zenith radish https://paste.pythondiscord.com/usanivuqul.py
I think it should work. I did a bit of editing in transfer and bullshit on my phone.
Okay, small error apparently, but easy fix.
@viral compass There was no noise.
yo
hay can you help me ?
im trying to install a .vsix in my ide
and i don't know how
my ide is vscode
is for in game scrips
line 116:
self.data-"position_delta"][target_b] *= np.random.normal(0, 5, kb)
to
self.data["position_delta"][target_b] *= np.random.normal(0, 5, kb)
^
a significantly stupider project: https://mustafaquraish.github.io/vanscape-aecor/
wow
def do_dfs(self):
self.current_node.visit()
self.visit_stack.append(self.current_node)
# we don't need to check if there's a connection to end if we're moving
# from a revisitable node
if not self.visit_stack[-1].revisitable and not self.path_exists_to_end():
return
for neighbor in self.current_node.visitable_neighbors():
# don't want to keep counting after we have visited end node
# because it's not revisitable
if neighbor == self['end']:
self.count += 1
if self.log_paths:
self.add_path()
continue
self.current_node = neighbor
self.do_dfs()
if self.current_node == self['start']:
return
self.current_node.unvisit()
self.current_node = self.visit_stack.pop()
class CaveNode():
def __init__(self, name: str, revisitable: bool, connected_nodes: Set[bool]=None) -> None:
self.name = name
self.revisitable = revisitable
self.connected_nodes = connected_nodes if connected_nodes else set()
self.was_visited = False
def __hash__(self):
return self.name.__hash__()
def __eq__(self, other: CaveNode):
return self.name == other.name
def is_connected_to(self, other:CaveNode):
return other in self.connected_nodes
def connect(self, other: CaveNode):
self.connected_nodes.add(other)
other.connected_nodes.add(self)
def can_be_visited(self):
return self.revisitable or not self.was_visited
def __str__(self) -> str:
return self.name
def __repr__(self) -> str:
return self.name
def visit(self):
if not self.can_be_visited():
raise Exception(f"Attempted to visit non visitable node {self}")
self.was_visited = True
def unvisit(self):
self.was_visited = False
def visitable_neighbors(self):
for node in self.connected_nodes:
if node.can_be_visited():
yield node
def digital_root(n):
r = sum([int(i) for i in str(n)])
while len(str(r)) > 1:
r = sum([int(i) for i in str(r)])
return r
def accum(s):
return "-".join(x.capitalize() for x in "".join([c*(i+1)+'-' for i,c in enumerate(s)])[:-1].split("-"))
def odd_or_even(arr):
return ['odd','even'][sum(arr)%2==0]
def find_uniq(arr):
for i,n in enumerate(arr):
if i == 0:
if n != arr[i+1]:
if n != arr[i+2]:
return n
return arr[i+1]
if n != arr[i+1]:
return arr[i+1]
!e
odd_or_even=lambda x:'eovdedn'[sum(x)%2::2]
print(odd_or_even(range(9)))
@vast fog cursed solution
yikes 😂
!resources
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
Overhere
Sorry didnt know
Im still confused
Im.new
At coding
I started watching a course gotta finish it
I dont get what it means tho
(" ")
I know
I just dont get booleon
The true or false
Oh ok
Print ("Hello, World")
A=B true
True
Ohhh
Wdym ur bad at explanation
Thanks u helped
So 1>0 = False
so that expression is true
Si it has to be true
Okay
So 100 <500 =True
Okay
So its like saying facts
In code
So why do u need to say that
:V i am bad at explanation right? i am confused if u ment to put ? or not
I think ur good
Good explaining this
He said it
@somber heath i didnt rlly get u there i was distracted and wssnt understanding but thanks for ur time
@round cedar Thanks dude
Haha (forget i laughed) i forced that laugh but it was funny
np
lmao
.
Is puthon better thsn jaava
Java
!e ```py
if True:
print("A")
if False:
print("B")```
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
A
!e
code
!e true
@whole bear :x: Your 3.11 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | NameError: name 'true' is not defined. Did you mean: 'True'?
!e ```py
if 0:
print("A")
if 1:
print("B")```
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
B
!e py print(1 == 1)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
True
@whole bear :white_check_mark: Your 3.10 eval job has completed with return code 0.
Opal Mist
!e py print(5 + 5 * (1 + 2))
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
20
!e print ("hello world")
@whole bear :white_check_mark: Your 3.11 eval job has completed with return code 0.
hello world
why cant i speak?
u need voice verify
how do i get voice verified?
5 + 5 * (1 + 2)
5 + 5 * 3
5 + 15
20
Did u place the answer
yeah computers are based off maths so obviously you can
@whole bear :x: Your 3.11 eval job has completed with return code 1.
001 | File "<string>", line 4
002 | =20
003 | ^
004 | SyntaxError: invalid syntax
btw, when you see
7/2+8
you should look at the / sign as the * sign
u need to put it inside print function if u wanna see the result
!e If print 20= True
If Print 21= False
5 + 5 * (1 + 2)
5 + 5 * 3
5 + 15
21
@whole bear :x: Your 3.11 eval job has completed with return code 1.
001 | File "<string>", line 1
002 | If print 20= True
003 | ^^^^^^^^
004 | SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
How would i do this
!e If print 20= True
If Print 21= False
5 + 5 * (1 + 2)
5 + 5 * 3
5 + 15
21
@whole bear :x: Your 3.11 eval job has completed with return code 1.
001 | File "<string>", line 1
002 | If print 20= True
003 | ^^^^^^^^
004 | SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
aghh i've been on this server for a few weeks but i left it and i started with python again and decided to join right now
u need to put them inside brackets and use single line
1 == 1 and 5 == 5 + 5
True and 5 == 5 + 5
True and 5 == 10
True and False
False
!e
print(5 + 5 * (1 + 2))
print(5 + 5 * 3)
print(5+15)
@round cedar :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 20
002 | 20
003 | 20
!e If print ("20= True") If Print "21= False"5 + 5 * (1 + 2)5 + 5 * 35 + 15 21
Ohh
!e if True = 20
print(5 + 5 * (1 + 2))
print(5 + 5 * 3)
print(5+15)
also use proper indentation
can anyone help me with this code?
why does it not recognize usr
i do that with int
xd
okay so lets say in line 13 why does it not recognize usr?
OHHH
what's the difference between + and , ?
in the print function
!e py a = "Aaa" b = "Bbb" c = a + b print(c)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
AaaBbb
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
A 1 5 beta True
!e ```py
def func(*args):
print(args)
func("A", "1", 5)```
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
('A', '1', 5)
!e py age = 15 name = "Grorge" text = "My name is " + name + " and I am " + str(age) + " years old." print(text)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
My name is Grorge and I am 15 years old.
!e py age = 15 name = "Porger" text = f"My name is {name} and I am {age} years old." print(text)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
My name is Porger and I am 15 years old.
I didn't understand exactly what f"text" does
!e py age = 15 name = "Porger" text = "My name is {name} and I am {age} years old." print(text)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
My name is {name} and I am {age} years old.
does the f stands for something?
so let's say i got an integer and a string inside, would it just print them as strings?
!e "" + 5
@somber heath :x: Your 3.11 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | TypeError: can only concatenate str (not "int") to str
!e
age = float(18)
name = 'numi'
txt1 = f"Hello, I'm {name}, and I am {age}."
print(txt1)
@austere onyx :white_check_mark: Your 3.11 eval job has completed with return code 0.
Hello, I'm numi, and I am 18.0.
!e
print(f'{3+4+5=}')
@dark mural :white_check_mark: Your 3.11 eval job has completed with return code 0.
3+4+5=12
!e
age_year = input('Age in years: ')
age_months = input('Months passed since your birthday: ')
name = input('name: ')
txt1 = f"Hello, I'm {name}, and I am {age_year} years and {age_months} months old."
print(txt1)
@austere onyx :x: Your 3.10 eval job has completed with return code 1.
001 | Age in years: Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | EOFError: EOF when reading a line
!e py print(f"{1 + 1}")
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
2
!e
print(f"{1 + 1}")
@whole bear :white_check_mark: Your 3.11 eval job has completed with return code 0.
2
my code is so bad i only follow rule of 🖕
!e py a = 5 print(f"This is how it works: {a = }. Pretty cool!")
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
This is how it works: a = 5. Pretty cool!
age_year = input('Age in years: ')
age_months = input('Months passed since your birthday: ')
name = input('name: ')
txt1 = f"Hello, I'm {name}, and I am {age_year} years and {age_months} months old."
print(txt1)
i think this is a nice way of using this
%"asdasdasd"
?
!e
a = "apples"
print("%s", a)
@round cedar :white_check_mark: Your 3.11 eval job has completed with return code 0.
%s apples
!e
a = "apples"
print("%", a)
@round cedar :white_check_mark: Your 3.11 eval job has completed with return code 0.
% apples
!e
def stuff(fmt):
print(fmt.format(4, 5, 6))
stuff("{}-{}-{}")
stuff("{} @ {} @ {}")
stuff("{}{}{}")
@dark mural :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 4-5-6
002 | 4 @ 5 @ 6
003 | 456
!e py text = "Apples: {}, pears: {}".format(5, 6) print(text)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
Apples: 5, pears: 6
!e
f='f={};print(f.format(repr(f)))';print(f.format(repr(f)))
@dark mural :white_check_mark: Your 3.11 eval job has completed with return code 0.
f='f={};print(f.format(repr(f)))';print(f.format(repr(f)))
how do i round down a float?
lets say 4.6 to 4
no negative numbers
just for age
!e py a = 5.5 b = int(a) print(b)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
5
!e py print("a" in "abc")
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
True
lets say i want to see if there's the alphabet in a string
yeah
this is what im doing, the idea is to filter the alphabets in the years section
probably not
!e py s = set("abbabbbab") print(s)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
{'a', 'b'}
!e py a = {1, 2} b = {3, 2, 1} print(a.issubset(b))
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
True
!e py text = "AppLe" print(text.lower())
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
apple
!e py print({1, 3, 2} == {1, 2, 3})
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
True
!e py result = all([True, True, True]) print(result)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
True
!e py result = all([True, False, True]) print(result)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
False
i dont get how i can filter out the ABC no matter what the order is
ohh wait
I wrote
set["asdeasd"] whatever
i thought there was no difference between [ and (
yeah
the code is not working
i dont really know what the heck this is
xd
what is the time right now for you?
well you've helped me a lot
okay, have a nice day
thank you bik and opal o/
text = "my long text"
searchterm = "long"
if searchterm in text:
print("Found long.")
else:
print("long was not found.")
!e
code
!eval [python_version] <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.
If multiple codeblocks are in a message, all of them will be joined and evaluated, ignoring the text outside of them.
By default your code is run on Python's 3.11 beta release, to assist with testing. If you run into issues related to this Python version, you can request the bot to use Python 3.10 by specifying the python_version arg and setting it to 3.10.
We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!*
@whole bear https://mustafaquraish.github.io/vanscape-aecor/
my screen time 2 days ago i have to touch grass + didn't see the sun for 69 years
this
bruh
13.5 seconds to generate 5 pictures
nice
@rugged root
What are the sfc and DISM commands again?
are you trying to make a new file and it doesn't let you?
Oh hi sir 
sfc /scannow; dism /online /cleanup-image /restorehealth; sfc /scannow
.bm
Me too, well, by @viscid lagoon s heart, at least
Does it need admin?
if that's the case I think there should be two solutions run your vs as admin and also repairing the vs could also have some affect
You guys are awake?
@whole bear Noooooooooooooo thou hast abandoned me
what does point 4 mean
does it mean rgb?
worry not dear friend! I shall returrrrrrrnnnnnn (in a bit )
👋
How goes it
the code i found
"blue green red"
stressful as alot of work and i wanna get it done fast + fireworks in background for independence day making brain hurt
this is opencv
this is what i found
@whole bear das u
yup pretty much sums it up
You doing well?
yesss finally tested negative for covid on sunday.....also have my first final exam tomorrow ....mixed emotions
How have you been?
Alive, although sleep has been rather garbage as of late
Melatonin gummies.
Already take 5mg along with my Trazadone. It's an issue of quality of sleep, not quantity
Aaah that tends to happen when you're stressed
Purchasing power parity (PPP) is the measurement of prices in different countries that uses the prices of specific goods to compare the absolute purchasing power of the countries' currencies, and, to some extent, their people's living standards. In many cases, PPP produces an inflation rate equal to the price of the basket of goods at one locati...
Hi
Any indians here? Dm me about this
I will be doing Msc and BE Computer Science
Should I also enroll in Btech By IIT Madras?
@cyan stirrup
Wrong
The reason is pressure
For high pressure you need more structural integrity
Which is hard to have in bikes etc
Without making the engine heavier
Data aggravation specialist.
Embrace Git CLI!
You have to stage your files first
git add -A
git commit -sm "<message>"
git push
done
Message is not optional
PS C:\Users\BradleyReynolds\dev\shenanigansd\scratchpad> git commit -smh "<message>"
error: pathspec '<message>' did not match any file(s) known to git
@rugged root no "smh" for you
Laaaaaaaaaaaaaaame
No, get out
Hemlock is a hunk
Make sure your entire source stays formatted
Get the hell out
Commit hooks are awful
I might want to commit to save something before changing it
PyDis runs the pre-commit checks inside the CI, when I was working on @viscid lagoon, I just didn't install them and let the CI do it. It was kind of nice
Why are you on a HTTP site?
HTTPS or go home
I swapped it to HTTPS
Agreed but switching to .NET Core for certain apps is hard.
BTW @amber raptor - How long does it take you to setup a new devcontainer?
hashicorp
EXPECTED LAUNCH: SUMMER 2022 Some details subject to change before launch. Product shown in video is a close to final prototype - we cannot guarantee that the product will be EXACTLY the same at launch. UPDATE: THE SHAFT COLOR HAS BEEN CHANGED FROM BLACK TO SILVER FOR DURABILITY/LONGEVITY. WE WILL SELL BOTH BLACK &
all cocks have beards
They have better beards than me
def get_pixel_brightness(rgb):
"""
Get brightness of pixel color
Parameters
----------
rgb : tuple (int(r), int(g), int(b))
RGB tuple representing pixel color
Returns
-------
int
Brightness of pixel from 0-255
"""
r_px, g_px, b_px = rgb
return int(sum([r_px, g_px, b_px]) / 3)
sum(rgb)
hi mr hemlock
Mr.Hemlock can you teach me code
html,css or javascript
i wanna start web developing
https://javascript.info/ That's the site I typically use to get caught up on JS
pew pew pew
Voice verification
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
😦
does it contain html and css too?
?
thx for helping buye
bye
U want a video course? U could try taking cs50w web programming. But it's recommend to take cs50x introduction to Computer Science first
Or try that Mr. Hemlock recommend
yes pleasse
please*
:v Mr. Hemlock can I post cs50 course links here
Sure
odd:
push rbp
mov rbp, rsp
mov DWORD PTR [rbp-4], edi
mov edx, DWORD PTR [rbp-4]
mov eax, edx
sar eax, 31
shr eax, 31
add edx, eax
and edx, 1
sub edx, eax
mov eax, edx
pop rbp
ret
odd:
push rbp
mov rbp, rsp
mov DWORD PTR [rbp-4], edi
mov eax, DWORD PTR [rbp-4]
and eax, 1
pop rbp
ret
Harvard University's introduction to the intellectual enterprises of computer science and the art of programming.
This course picks up where Harvard University's CS50 leaves off, diving more deeply into the design and implementation of web apps with Python, JavaScript, and SQL using frameworks like Django, React, and Bootstrap. Topics include database design, scalability, security, and user experience. Through hands-on projects, students learn to write and ...
wassup guys
@rugged root can i share screen?
coding
what?
ye ok
so can i share screen?
!stream 953699867841159268
✅ @sour willow can now stream until <t:1660585536:f>.
!pep 582
!pep 517 621
!pep 621
Dart is not Java
It can compile to either native code or JavaScript, [....]
Made by Google
I didn't actually know that
Handy
I missed talk about PEP 621 ⁉️ 😭
I was just mentioning stuff that PDM did
Did you know PDM started creating virtual environments by default in v2.0?
Kind of defeats the whole reason for it existing
What would they bitch about?
They're the ones that decided to go out of their way to use the niche system
Here, please, take a free bible, https://doc.rust-lang.org/book/
We have services at 10:30 on Sunday mornings, and we also have small groups on Wednesday nights
Hope to see you there!
Yeah, you can even do that in blocks, so the block will return the value
Reason lets you write simple, fast and quality type safe code while leveraging both the JavaScript & OCaml ecosystems.
@rugged root ❤️
I'm not 100% wrong. I can justify it
Oh no I get why you would think that, but there's some important subtle difference with regards to semantics on taking references
Oh sure, but that's why I prefaced with broad strokes
fair enough

Nice and small
Sure
Blame the eyes
This is still a Python server
We still do Python here
Embrace Rust!
https://github.com/python/cpython/blob/3adb4d864bb18a51334c922a732e5e3602799ba1/Objects/longobject.c#L21
So... are all Python "ints" actually "longs"?
Objects/longobject.c line 21
class int "PyObject *" "&PyLong_Type"```
Objects/longobject.c line 1
/* Long (arbitrary precision) integer object implementation */```
It does agree it's arbitrary
longs would be used for large byte data
Arbitrary prison?
Being forced to be required to use an arbitrarily selected language for each new project
Does anyone know how to bypass the cv2.imshow() error on gcollab?
Thinking is overrated
👋
nope
It's actually not terrible
thats not the mouse i have
Lol
Was wondering how you were, then laund threw me off
I'm good thanks 🙂
mhm
Any way I can get voice verified sooner :PP
not really, having a text convo is the best way
Damn
!stream 457362690323644466
✅ @toxic hare can now stream until <t:1660595775:f>.
@glad sandal what do you do with python?
"""
Write a Python Programming Language program to compute the greatest common divisor (GCD) of two positive integers.
The greatest common divisor (GCD) of two nonzero "Integers: a and b", is the greatest positive "Integer: d" such that
the "Integer: d" is a divisor of both "Integers: a and b"; that is, there are "Integers: e and f" such that "Integer: a
= de" and "Integer: b = df", and "Integer: d" is the largest such integer. The GCD of the "Integers: a and b" is
generally denoted as "gcd(a, b)".
"""
def gcd(num_x, num_y):
num_value = 1
if num_x % num_y == 0:
return num_y
for values in range(int(num_y / 2), 0, -1):
if (num_x % values == 0) and (num_y % values == 0):
num_value = values
break
return num_value
result1 = gcd(12, 17)
result2 = gcd(4, 6)
result3 = gcd(336, 360)
print("\n" + "The GCD of 12 & 17 is :", result1)
print("The GCD of 4 & 6 is :", result2)
print("The GCD of 336 & 360 is :", result3)
@lavish rover I'm upset that abs() just gets rid of the sign on a number instead of just giving me great abs
I feel cheated
what do you think of this syntax:
if a != null and b == null { ... }
// to
if a? and not b? { ... }
Oh for nullables?
for pointers yeah
That's the most common style, right?
is it? I don't know if I've seen it anywhere
reminds me of C# I think
One sec
I believe kotlin does this too
cool, so it's a thing people already do, nice
pointers? rust?
rust uses ? for error propagation
# number scraper
bargraphdata = []
for counter in range(0,225):
y = soup.find_all('td', class_="numeric")[counter]
counter = counter + 1
numberstrings = y.string
if (counter == 8) or ((counter - 8) % 9 == 0):
numberstrings = numberstrings.replace("%","")
numbers = float(numberstrings)
print(numbers)
Gotcha.
BTW @rugged root uk the topic that we were talking about why i prefer java syntax
is that because it's the language is very restricted the syntax is kinda restricted
so
and the keywords are more english than python that's why
i think it makes more sense
More English than Python's?
Yeah I think so
Anyone have any cool ML things they're working on?
for exmaple have you used the awt library? @rugged root
Is that a Python or Java one
it's java it was the first graphic library for java
@terse needle I also want to have ternaries, but I don't know if I like the cond ? a : b syntax from C
any suggestions on a better one?
hmm
or you too, hemlock, any ideas?
could do x if cond else b but eh I don't like that the condition goes in the middle
it's so english that even if you don't know anything about the library have writen some normal programs in java you know that the thing that you want the keyword is going to be something like this it makes so much sense
I hate suggesting it but if x then y else z
I prefer this to x if cond else b
and the chaining thing makes it obvious the thing that you are talking about where does it come from
Java just has so much extra clutter, though
yeah I'm not a fan of that as well but I think that's why the syntax makes more sense to me
like seriously when i wrote my first oop in python was like holy shit this bs what the hell is this
but java is so beautiful when making oops
Fair enough
It ends up being preference in the end
@toxic hare Would you mind hopping off stream? I'm going to have to head out and for folks with temporary stream perms, I prefer if I'm around the first few times
got it
Cheers
no problem mate 👍
let x = if y > 5 {
"foo"
} else {
"bar"
}
char* x;
if y > 5 {
x = "foo";
} else {
x = "bar";
}
if y > 5 {
foo();
} else {
bar();
}
.wa s 99F to C
about 37.2 degrees Celsius
.wa s 20C to F
68 degrees Fahrenheit
!e assert "" is None
@terse needle :x: Your 3.11 eval job has completed with return code 1.
001 | <string>:1: SyntaxWarning: "is" with a literal. Did you mean "=="?
002 | Traceback (most recent call last):
003 | File "<string>", line 1, in <module>
004 | AssertionError
!e print(id(None))
@terse needle :white_check_mark: Your 3.11 eval job has completed with return code 0.
139634492842944
# number scraper
dictionary = {}
# set names for dictionary
for namecounter in range (0,25):
names = soup.select("th a")[namecounter]
namecounter += namecounter
if (counter % 9 == 0):
y = soup.find_all('td', class_="numeric")[counter]
counter = counter + 1
numberstrings = y.string
if (counter == 8) or ((counter - 8) % 9 == 0):
numberstrings = numberstrings.replace("%","")
numbers=float(numberstrings)
dictionary.update({names:numbers})
IndexError: list index out of range
Subscribe to MinutePhysics - it's FREE! http://dft.ba/-minutephysics_sub
For recent scientific publications on the walk/rain question: http://iopscience.iop.org/0143-0807/33/5/1321
MinutePhysics is on Google+ - http://bit.ly/qzEwc6
And facebook - http://facebook.com/minutephysics
And twitter - @minutephysics
Minute Physics provides an energe...
{None: 5.0, 'Nadia Bandy': 5.0, 'Henry Boone': 5.0, 'Sofia Bordenick': 5.0, 'Tess Breen': 5.0, 'Jack Evans': 5.0, 'Isaac Gilchrist': 5.0, 'Hayden H.': 5.0, 'Hugh Hagen': 5.0, 'Rohan Haugen': 5.0, 'Marc Lemery': 5.0, 'Ella Meyer': 5.0, 'Owen Meyer': 5.0, 'Ian Palansky': 5.0, 'Francis Paloma': 5.0, 'Ian Polansky': 5.0, 'Shawn Pourifarsi': 5.0, 'Adrian Quiroz-Nugent': 5.0, 'Leo Renzulli': 5.0, 'Vasa S.': 5.0, 'Nico Schultz': 5.0, 'Aiyla Sheikh': 5.0, 'Oguz Tanatar': 5.0, 'Liam Wagner': 5.0, 'Cedric Wu': 5.0}
@toxic hare why don't you use a list as an value?
name: data data data data
name2: data ....
counter = 0
for counter in range (225):
y = soup.find_all('td', class_="numeric")[counter]
counter = counter + 1
numberstrings = y.string
# removes percentage
if (counter == 8) or ((counter - 8) % 9 == 0):
numberstrings = numberstrings.replace("%","")
# end of removing percentage
numbers=float(numberstrings)
print(numbers)
# number scraper
dictionary = {}
counter = 0
# set names for dictionary
for namecounter in range (0,25):
names = soup.select("th a")[namecounter]
namecounter += namecounter
names = names.string
if (counter % 9 == 0) :
y = soup.find_all('td', class_="numeric")[counter]
counter = counter + 1
numberstrings = y.string
# removes percentage
if (counter == 8) or ((counter - 8) % 9 == 0):
numberstrings = numberstrings.replace("%","")
# end of removing percentage
numbers=float(numberstrings)
print(numbers)
dictionary.update({names:numbers})
print(dictionary)
# number scraper
dictionary = {}
# set names for dictionary
for namecounter in range(0, 25):
dictionary[soup.select("th a")[namecounter].string] = soup.find_all('td', class_="numeric")
print(dictionary)
dictionary = {}
for namecounter in range(0, 25):
dictionary[soup.select("th a")[namecounter].string] = [float(x.string.replace("%", "")) for x in soup.find_all('td', class_="numeric")]
print(dictionary)
I hope the list comprehension doesn't blow your brain too much @toxic hare
This challenge is called Hint of Color
--------------------------------------
In this challenge, you will write a function called hint_of_color that takes an array as input.
This array is a 2d array of tuples, each containing 3 values.
The 2d shape of the grid represent the position of the colors in a given "image".
The three integers in the tuple represent the RGB color values (0-255) of the pixel in that position.
The tuple is formatted as (R,G,B).
The hint_of_color function should return the 2d array of "image" data in the same order, but with all of the RGB tuple values replaced with a string indicating the most dominant shade of RGB color present. (0,0,0) the only shade of black, (255,255,255) is the only shade of white. The dominant shade for any color in between black and white is the highest value in the RGB tuple. If there are two matching values in the tuple, the order of precedence is R > G > B.
Example RGB tuple conversions:
(0,0,0) => black
(255,255,255) => white
(0,1,0) => green
(30,75,180) => blue
(225,50,0) => red
Example test case:
Input:
[[(25, 70, 180), (221, 0, 50), (10,199,0)], [(0, 0, 0), (255,255,255), (0,50,0)], [(70,81,0), (177,40,90), (0,0,0)]]
Output:
[["blue", "red", "green"], ["black", "white", "green"], ["green", "red", "black"]]
Here's the tests:
def hint_of_color(data):
# your code here
return None
test_data = [
[[(25, 70, 180), (221, 0, 50), (10,199,0)], [(0, 0, 0), (255,255,255), (0,50,0)], [(70,81,0), (177,40,90), (0,0,0)]],
[[(221, 0, 50), (221, 0, 50), (255,255,255)], [(10,199,0), (255,255,255), (0,50,0)], [(255,255,255), (177,40,90), (0,0,0)], [(177,40,90), (177,40,90), (0,50,0)]]
]
answers = [
[["blue", "red", "green"], ["black", "white", "green"], ["green", "red", "black"]],
[["red", "red", "white"], ["green", "white", "green"], ["white", "red", "black"], ["red", "red", "green"]]
]
for q,a in zip(test_data, answers):
print(hint_of_color(q) == a)
obviously (0,2,0) is also black, but I just threw this together an hour or two ago
so I'm going to refine it a bit once I get some feedback
and maybe change the end goal so not discover the most dominant shade, but another calculation.
this is what I have so far
def get_col_name(col):
r, g, b = col
if r == g == b:
return "black" if r == 0 else "white"
return ("red", "green", "blue")[col.index(max(col))]
def hint_of_color(data):
return [[get_col_name(col) for col in row] for row in data]
ind = max(range(3), key=lambda x: col[x])
def hint_of_color(data):
# your code here
return None
test_data = [
[[(25, 70, 180), (221, 0, 50), (10,199,0)], [(0, 0, 0), (255,255,255), (0,50,0)], [(70,81,0), (177,40,90), (0,0,0)]],
[[(221, 0, 50), (221, 0, 50), (255,255,255)], [(10,199,0), (255,255,255), (0,50,0)], [(255,255,255), (177,40,90), (0,0,0)], [(177,40,90), (177,40,90), (0,50,0)]],
[[(25, 70, 180), (221, 0, 50), (10,199,0)], [(0, 0, 0), (255,255,255), (0,50,0)], [(70,81,0), (150,178,178), (0,0,0)]]
]
answers = [
[["blue", "red", "green"], ["black", "white", "green"], ["green", "red", "black"]],
[["red", "red", "white"], ["green", "white", "green"], ["white", "red", "black"], ["red", "red", "green"]],
[["blue", "red", "green"], ["black", "white", "green"], ["green", "green", "black"]],
]
for q,a in zip(test_data, answers):
print(hint_of_color(q) == a)
should eval to:
True
True
True
sup dude
like judges contacted me and said hey there's a part of your code that is producing an error
not bad
and they said if you want
we can give you one more day
and i said sure very nice of you
and I'm currently trying to fix that part
right on
but I just can't figure out this is not working
want a second perspective?

I mean why not
I feel like sh*t i've been working on this issue for 6 hours or something and I haven't still fixed it
i'm dying rn so tired
kk send a screenshot or stream
can't do it here though i'm not allowed to stream
i have to call u
I changed the algo a little bit
@south bone if you feel good after you finish with him, I would like to ask a question too if that's okay ✌
!voiceverify
future me looking for the pyinstaller cmd its "py -m pip install pyinstaller"
If you're doing anything pyinstaller I recommend using auto-py-to-exe instead. Makes life a lot easier. https://pypi.org/project/auto-py-to-exe/