#voice-chat-text-0
1 messages Β· Page 208 of 1
@vapid pier π
@whole bear π
"""rotate self counterclockwise by angle
"""
perp = Vec2D(-self[1], self[0])
angle = math.radians(angle)
c, s = math.cos(angle), math.sin(angle)
return Vec2D(self[0]*c+perp[0]*s, self[1]*c+perp[1]*s)```
result = round(math.degrees(math.atan2(y, x)), 10) % 360.0
@molten jettyπ
OPAL
!voice π
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
thanks π
@naive tendon π
hello
Shop for Quartz White Dial Unisex Watch 1342.84 by Sekonda at JOMASHOP for only $0.00! WARRANTY or GUARANTEE available withevery item. We are the internet's leading source for ! (Model # )
Hey @somber heath π
@empty breach π
Hey guys
@sharp egret π
hi
winged vs weaned
ruined
@whole bear
Hi
@gleaming geyser π
Veluwemeer
With coconutBattery you are always aware of your current battery health. It shows you live information about the battery in your Mac and iOS devices (iPhone, iPad)
arrived at the train station
Macbook Pro M2 14 16gb 1tb ai prezzi piΓΉ bassi del mercato β PerchΓ¨ pagare di piΓΉ? Cerca tra le migliori offerte del mercato β Trovaprezzi.it Γ¨ il motore di ricerca che ti fa risparmiare sui tuoi acquisti β Impossibile trovare a meno
nah mate
you want to fight
?
look at my status i am using .net rn hahhaha
vamos
i can't do thaht : /
hhi
i just want to die -_-
alien potato ?
nice
I'll be back. Gonna head to the staff meeting. Cheers
what aae you reading @mild quartz
I'm boiling some tortellini spinach. Is it okay to eat these before bed?
I can add a bit of curd cheese
@cloud stratus http://cs231n.stanford.edu/
@shadow pivot asking how he can get voice verified
python script.py > result.txt
oh i got to do some text
Thank you for the book and reality check :) @mild quartz
@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.
test
!e
def test():
try:
1 / 0
except Exception as e:
raise RuntimeError("fail") from e
finally:
print("test")
test()
@vocal basin :x: Your 3.12 eval job has completed with return code 1.
001 | test
002 | Traceback (most recent call last):
003 | File "/home/main.py", line 3, in test
004 | 1 / 0
005 | ~~^~~
006 | ZeroDivisionError: division by zero
007 |
008 | The above exception was the direct cause of the following exception:
009 |
010 | Traceback (most recent call last):
011 | File "/home/main.py", line 8, in <module>
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/UGSFMSDUKHHNHLLA55MNAB42PE
!d contextlib.contextmanager
@contextlib.contextmanager```
This function is a [decorator](https://docs.python.org/3/glossary.html#term-decorator) that can be used to define a factory function for [`with`](https://docs.python.org/3/reference/compound_stmts.html#with) statement context managers, without needing to create a class or separate [`__enter__()`](https://docs.python.org/3/reference/datamodel.html#object.__enter__) and [`__exit__()`](https://docs.python.org/3/reference/datamodel.html#object.__exit__) methods.
While many objects natively support use in with statements, sometimes a resource needs to be managed that isnβt a context manager in its own right, and doesnβt implement a `close()` method for use with `contextlib.closing`
An abstract example would be the following to ensure correct resource management:
especially this thing
I probably don't use this specific one often enough
it's way easier compared to usual enter/exit
what it doesn't handle well, I guess, is multiple-enter/exit thing
a lot of what I do involves them
mostly async ones
code
!e
from contextlib import contextmanager
@contextmanager
def f():
while True:
yield
with f():
pass
@vocal basin :x: Your 3.12 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 8, in <module>
003 | with f():
004 | File "/lang/python/default/lib/python3.12/contextlib.py", line 148, in __exit__
005 | raise RuntimeError("generator didn't stop")
006 | RuntimeError: generator didn't stop
this
full-file read/write is easier with pathlib.Path methods
I'd expect multiprocessing to have some convenience functions too
Python 4
following Mark Rendle's "prediction"
I've only played tetris effect recently
@torn lotus π
this took way too long
what's going on
there was a tournament recently but I was too lazy to participate
For what?
(tecwc)
I also still don't like pvp tetris
I don't understand it
this one specifically was score attack which isn't really proper pvp tetris
i've seen very competitive matches
there are two common "types"
the way the change direction into place is amazin
thing with adding newlines
score attack
the only place where pvp aspect comes in with score attack is the timer
you can lose on purpose if your opponent is slow but would outrun your score eventually
this way you start the timer for them
and still not done with these two
@whole bear π
hi opal
Hi
languages are a fun discossion
@forest gorge π
I can't talk
i have been in the server for more than 3 days i just left since a day ago
!voiceπ
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
I fill all the requirements, its just I accidentally left
is there any way to get around that?
Can i ask a mod?
I am not waiting for 12 hours
anyone got a fun idea for adding to a website?
pretty much anything
just soemthing π
i do django
yeah it gets boring when you just keep doing the same stuff
bees?
are you collecting/processing data of European users?
if yes, add GDPR compliance page (including the export/deletion of data all their data you store)
oh
like animation
hmm
i wish i had the ability to do anything graphical
i feel like it's more fun to do
backend is a bit dark
π that is accurate
with the only website I made, that other people frequently used, backend was the easier part
or, at least, smaller (3~5 times so)
blogs are easy
form is a bit harder
am currently strugling on a form cause it has many to many fields
that website had no forms
a single-page chat
django has good support for forms tho
this is an edge case
at the time I used Flask because I didn't know any better
today I would definitely use FastAPI instead
FastAPI and aiohttp(server) also both allow some cursed stuff because they're async
bee log
b log
trie
mindful dev was working on a website to track bugs yesterday
@unborn storm linked list is a tree
ownership hierarchy is what matters
semilattice is not a tree
(some)
and doubly-linked list isn't
(ownership is not tree-like)
π
@outer zinc π
hi
@outer zinc @whole bear #media-processing message
@vocal basin :x: Your 3.12 eval job has completed with return code 1.
001 | /home/main.py:1: SyntaxWarning: 'NoneType' object is not subscriptable; perhaps you missed a comma?
002 | None[0]
003 | Traceback (most recent call last):
004 | File "/home/main.py", line 1, in <module>
005 | None[0]
006 | ~~~~^^^
007 | TypeError: 'NoneType' object is not subscriptable
if that data comes from an external API/dataset, it's quite normal to have fields missing/null
print(e)
(likely)
maybe even logging.error
!code
!paste
If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.
@umbral spoke π
@limpid nova π
how are you doing
Good.
@warped raft , do you know web development?
not much
but i got a taste of javascript
i am trying to scrape a site
the table here. it has some hidden rows. i want to scrape those too.
you see the plus here
they only show up if i click plus
there are these onclick something here that shows it. idk what these are. are they js?
The terms of service could conceivably be interpreted as prohibiting webscraping. "Copying of materials".
@remote cradle π
yeah idc about that. doing it for personal project and not commercial. they cant catch it anyways
hii
This server does.
uhh i am not asking anyone to do it for me lol. just want to know how its working. Maybe for my own knowledge :)
I'm not going to engage in an argument about this.
Just mentioning it for your consideration.
bro....
!e py import datetime now = datetime.datetime.now() dob = datetime.datetime(year = 1983, month = 1, day = 1) age = (now - dob).days // 365 print(age)
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
40
@limpid nova If you were after something a bit more dynamic.
(Don't rely on datetime to be precise.)
@crimson lark π
whatup
I know ```python
x = 7
is justs a custom variable so i didn't search it
*just
mac and cheese so good they had to bring out the maths
250 levels of original, mind-bending riddles! Over 4 million visitors to date, but no one has finished it all... will you be the first?
@cobalt seal π
!voice π
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
no problem -- until then can someone help with the question I've posted at python-help?
I'm new to python world -- I have some background in other languages but would like some feedback
thanks π
just linking for convenience
https://discord.com/channels/267624335836053506/1168544724974567474
Oh-- that's nice
ima take a look but no promises i know how to help
sure -- I'm open to different approaches, the one I've posted may not be the best way to handle that
I've been trying to use my experience with other frameworks, languages, etc to achive the goal
ah i don't quite understand how this is meant to work hold up
@gritty garden also it's not a problem
ye idk
ok
@somber heath i think i fixed it
why this emoji looks like the sound ||/pipi/|| 
idgi
The sound?
This C++ program is actually 3x slower then a python one which does the exact same thing
#include <iostream>
#include <fstream>
#include <string>
#include <unordered_set>
int main(int argc, char* argv[]) {
if (argc != 2) {
std::cerr << "Usage: " << argv[0] << " <input_file>" << std::endl;
return 1;
}
const std::string input_file_path = argv[1];
std::unordered_set<std::string> unique_lines;
std::ifstream input_file(input_file_path);
if (!input_file.is_open()) {
std::cerr << "Error: Failed to open input file." << std::endl;
return 1;
}
std::string line;
while (std::getline(input_file, line)) {
unique_lines.insert(line);
}
input_file.close();
//for (const std::string& unique_line : unique_lines) {
// std::cout << unique_line << std::endl;
//}
return 0;
}
import sys
file_path = sys.argv[1]
seen = set()
with open(file_path, 'rb') as f:
for line in f:
if line not in seen:
seen.add(line)
# turn data back into a string
#output_string = b''.join(seen)
#output_string = output_string.decode('utf-8', errors='ignore')
# output the string to cmdline
#sys.stdout.write(output_string)
let me try it in rust
@lucid shoal how to test its performance?
do you have the rust toolchain?
Lol
start = time.time()
subprocess.Popen([r'path/to/file.exe', file], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
time1 = time.time()-start
print(time1)
Keeps it fair doing it this way
Show example
bruh it wont let me send the exe
Bruh
std::time::Instant
Why are you trying to send the exe
so you can test it
You test it
i dont have your file
Yes you do
.
no i mean the test file
?
.
the input file
i imagine it can be any file
I can dm it to you
to test py speed, use https://docs.python.org/3/library/time.html#time.perf_counter pls ty
ok
Show example
from time import perf_counter
start_time = perf_counter()
for i in range(1000000):
_ = i * 2
end_time = perf_counter()
elapsed_time = end_time - start_time
print(f"Elapsed time: {elapsed_time:.6f} seconds")
from time import perf_counter
def foo():
...
t0 = perf_counter()
foo()
print(perf_counter - t0)
bruh
Uummm
Something weird
def get_universally_unique_string():
#number = None
#if not number:
timestamp = str(time.perf_counter_ns()).replace('.', '')
#else:
# timestamp = number
unique_number = int(timestamp)
unique_filename = convert_to_base62(unique_number)
return unique_filename
def convert_to_base62(number):
number = int(str(number).replace('.', ''))
# Base 62 characters: digits (0-9), lowercase letters (a-z), and uppercase letters (A-Z)
base62_chars = string.digits + string.ascii_lowercase + string.ascii_uppercase
if number == 0:
return base62_chars[0]
base62_str = ''
while number > 0:
number, remainder = divmod(number, 62)
base62_str = base62_chars[remainder] + base62_str
return base62_str
Function is from that package
@torpid reef π
hello... i dont have permission to talk
!voice π
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
thanks.. checking now
ummm... apparently i havn't spent enough time in here yet π₯²
!voice
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
Yeah rip
What is this
rust vs python
What was the result
@sweet latch π
result?
python 1.43s
rust 1.42s
How many lines is the rsut one
Import sys
file_path = sys.argv[1]
seen = {line for line in open(file_path)}
Pretty much one line
Import sys; file_path = sys.argv[1]; seen = {line for line in open(file_path)}
import sys
file_path = sys.argv[1]
seen = {line for line in open(file_path, 'rb')}
how fast is this on your machines?
.
it kinda depends on your hardware
my laptop's single threaded performance is poor
with open(...) as file:
seen = set(file)```
seen = {line for line in open(file_path)}
{*file}```
seen = set(open(file_path))
{*open(__import__('sys').argv[1])}
stop
Nice
{*open(__import__('sys').argv[1])}
Love it
print(''.join(list({*open(__import__('sys').argv[1])})))
print(''.join({*open(__import__('sys').argv[1])}))
with open(...) as file:
seen = set(file.read().splitlines())```
print(*{*open(__import__('sys').argv[1])}, sep="")
@crude arrow π
!voice
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
@crude arrow your turn ^
@dark forum π
hi
!code
class AssertionError(Exception):
def __init__(self, letter):
self.message = "ongeldige letter: {}".format(letter)
super().__init__(self.message)
def sprong(letter, nummer):
if not (isinstance(letter, str) and len(letter) == 1 and letter.isalpha()):
raise AssertionError(letter)
nummer = int(nummer)
nummer = nummer % 26
if 97 <= ord(letter) <= 122:
nieuweplek = ord(letter) + nummer
if nieuweplek > 122:
nieuweplek = nieuweplek - 26
elif nieuweplek < 97:
nieuweplek = nieuweplek + 26
else:
nieuweplek = nieuweplek
nieuweletter = chr(nieuweplek)
if 65 <= ord(letter) <= 90:
nieuweplek = ord(letter) + nummer
if nieuweplek > 90:
nieuweplek = nieuweplek - 26
elif nieuweplek < 65:
nieuweplek = nieuweplek + 26
else:
nieuweplek = nieuweplek
nieuweletter = chr(nieuweplek)
return nieuweletter
def spiegelbeeld(letter, nummer):
klokmee = sprong(letter, nummer)
kloktegen = sprong(letter, - nummer)
spiegel = kloktegen + klokmee
return spiegel
class AssertionError(Exception):
def __init__(self, letterpaar):
self.message = "ongeldig paar: {}".format(letterpaar)
super().__init__(self.message)
def fixatie(letterpaar, nummer):
fix = sprong(letter[0], nummer)
fix2 = sprong(letter[1], nummer)
if not(fix == fix2):
raise AssertionError(letterpaar)
return fix
def sprong(letter, nummer):
try:
if not (isinstance(letter, str) and len(letter) == 1 and letter.isalpha()):
raise AssertionError(letter)
nummer = int(nummer)
nummer = nummer % 26
if 97 <= ord(letter) <= 122:
nieuweplek = ord(letter) + nummer
if nieuweplek > 122:
nieuweplek = nieuweplek - 26
elif nieuweplek < 97:
nieuweplek = nieuweplek + 26
else:
nieuweplek = nieuweplek
nieuweletter = chr(nieuweplek)
if 65 <= ord(letter) <= 90:
nieuweplek = ord(letter) + nummer
if nieuweplek > 90:
nieuweplek = nieuweplek - 26
elif nieuweplek < 65:
nieuweplek = nieuweplek + 26
else:
nieuweplek = nieuweplek
nieuweletter = chr(nieuweplek)
return nieuweletter
except Exception as e:
print(e)
try:
tries_some_code = 'if it fails with the exception, moves to except'
except YourErrorType:
raise AssertionError
def sprong(letter, nummer):
try:
if not (isinstance(letter, str) and len(letter) == 1 and letter.isalpha()):
raise AssertionError(letter)
nummer = int(nummer)
nummer = nummer % 26
if 97 <= ord(letter) <= 122:
nieuweplek = ord(letter) + nummer
if nieuweplek > 122:
nieuweplek = nieuweplek - 26
elif nieuweplek < 97:
nieuweplek = nieuweplek + 26
else:
nieuweplek = nieuweplek
nieuweletter = chr(nieuweplek)
if 65 <= ord(letter) <= 90:
nieuweplek = ord(letter) + nummer
if nieuweplek > 90:
nieuweplek = nieuweplek - 26
elif nieuweplek < 65:
nieuweplek = nieuweplek + 26
else:
nieuweplek = nieuweplek
nieuweletter = chr(nieuweplek)
return nieuweletter
except Exception as e:
return e
assert a == b
def sprong(letter, nummer):
try:
if not (isinstance(letter, str) and len(letter) == 1 and letter.isalpha()):
raise AssertionError(letter)
except AssertionError as e:
print(e)
nummer = int(nummer)
nummer = nummer % 26
if 97 <= ord(letter) <= 122:
nieuweplek = ord(letter) + nummer
if nieuweplek > 122:
nieuweplek = nieuweplek - 26
elif nieuweplek < 97:
nieuweplek = nieuweplek + 26
else:
nieuweplek = nieuweplek
nieuweletter = chr(nieuweplek)
if 65 <= ord(letter) <= 90:
nieuweplek = ord(letter) + nummer
if nieuweplek > 90:
nieuweplek = nieuweplek - 26
elif nieuweplek < 65:
nieuweplek = nieuweplek + 26
else:
nieuweplek = nieuweplek
nieuweletter = chr(nieuweplek)
return nieuweletter
Dutch person spotted
this looking interresant
belgian
close enough
try:
assert a == b
except AssertionError as e:
print("Traceback (most recent call last): ")
print(e)
@crude arrow
try:
assert a == b
except AssertionError as e:
print("Traceback (most recent call last): ")
print(f"AssertionError {e}")
def sprong(letter, nummer):
try:
assert isinstance(letter, str) and len(letter) == 1 and letter.isalpha()
except AssertionError as e:
print("Traceback (most recent call last): ")
print(f"AssertionError {e}")
nummer = int(nummer)
nummer = nummer % 26
if 97 <= ord(letter) <= 122:
nieuweplek = ord(letter) + nummer
if nieuweplek > 122:
nieuweplek = nieuweplek - 26
elif nieuweplek < 97:
nieuweplek = nieuweplek + 26
else:
nieuweplek = nieuweplek
nieuweletter = chr(nieuweplek)
if 65 <= ord(letter) <= 90:
nieuweplek = ord(letter) + nummer
if nieuweplek > 90:
nieuweplek = nieuweplek - 26
elif nieuweplek < 65:
nieuweplek = nieuweplek + 26
else:
nieuweplek = nieuweplek
nieuweletter = chr(nieuweplek)
return nieuweletter
def spiegelbeeld(letter, nummer):
klokmee = sprong(letter, nummer)
kloktegen = sprong(letter, - nummer)
spiegel = kloktegen + klokmee
return spiegel
Joi and I both have COVID, so I won't be on much
@oblique ridge
im here but looks like mic not working rn
Nooooo
have you considered that your microphone doesn't like you
I hope you both feel better!
but basically the thingy was solved
issue is the online homework portal says that his traceback is messed up
and that's cause he's got like the standard traceback that has like file and line number and stuff which is good
but the expected result is ```
Traceback (most recent call last):
AssertionError blah blah
brb fixing mic
def sprong(letter, nummer):
assert isinstance(letter, str)
assert len(letter) == 1
assert letter.isalpha()
nummer = nummer % 26
if 97 <= ord(letter) <= 122:
nieuweplek = ord(letter) + nummer
if nieuweplek > 122:
nieuweplek = nieuweplek - 26
elif nieuweplek < 97:
nieuweplek = nieuweplek + 26
else:
nieuweplek = nieuweplek
nieuweletter = chr(nieuweplek)
elif 65 <= ord(letter) <= 90:
nieuweplek = ord(letter) + nummer
if nieuweplek > 90:
nieuweplek = nieuweplek - 26
elif nieuweplek < 65:
nieuweplek = nieuweplek + 26
else:
nieuweplek = nieuweplek
nieuweletter = chr(nieuweplek)
else:
raise AssertionError(f"ongeldige letter: {letter}")
return nieuweletter
def sprong(letter, nummer):
assert isinstance(letter, str)
assert len(letter) == 1
assert letter.isalpha(), f"ongeldige letter: {letter}"
nummer = nummer % 26
nieuweplek = ord(letter) + nummer
if 97 <= ord(letter) <= 122:
if nieuweplek > 122:
nieuweplek = nieuweplek - 26
elif nieuweplek < 97:
nieuweplek = nieuweplek + 26
else:
nieuweplek = nieuweplek
elif 65 <= ord(letter) <= 90:
if nieuweplek > 90:
nieuweplek = nieuweplek - 26
elif nieuweplek < 65:
nieuweplek = nieuweplek + 26
else:
nieuweplek = nieuweplek
nieuweletter = chr(nieuweplek)
return nieuweletter
!code
def sprong(letter, nummer):
assert isinstance(letter, str), f"ongeldige letter: {letter}"
assert len(letter) == 1, f"ongeldige letter: {letter}"
assert letter.isalpha(), f"ongeldige letter: {letter}"
nummer = nummer % 26
nieuweplek = ord(letter) + nummer
if 97 <= ord(letter) <= 122:
if nieuweplek > 122:
nieuweplek = nieuweplek - 26
elif nieuweplek < 97:
nieuweplek = nieuweplek + 26
else:
nieuweplek = nieuweplek
elif 65 <= ord(letter) <= 90:
if nieuweplek > 90:
nieuweplek = nieuweplek - 26
elif nieuweplek < 65:
nieuweplek = nieuweplek + 26
else:
nieuweplek = nieuweplek
nieuweletter = chr(nieuweplek)
return nieuweletter
:
def sprong(letter, nummer):
message = f"ongeldige letter: {letter}"
assert isinstance(letter, str), message
assert len(letter) == 1, message
assert letter.isalpha(), message
nummer = nummer % 26
nieuweplek = ord(letter) + nummer
if 97 <= ord(letter) <= 122:
if nieuweplek > 122:
nieuweplek = nieuweplek - 26
elif nieuweplek < 97:
nieuweplek = nieuweplek + 26
elif 65 <= ord(letter) <= 90:
if nieuweplek > 90:
nieuweplek = nieuweplek - 26
elif nieuweplek < 65:
nieuweplek = nieuweplek + 26
nieuweletter = chr(nieuweplek)
return nieuweletter
holy shit discord is typing
def add(x, y):
return x + y
def subtract(x, y):
return x - y
def multiply(x, y):
return x * y
def divide(x, y):
if y != 0:
return x / y
else:
return 'Divisione per zero non Γ¨ possibile'
print("Seleziona l'operazione.")
print("1.Addizione")
print("2.Sottrazione")
print("3.Moltiplicazione")
print("4.Divisione")
choice = input("Inserisci il numero dell'operazione da eseguire (1/2/3/4):")
num1 = int(input("Inserisci il primo numero: "))
num2 = int(input("Inserisci il secondo numero: "))
if choice == '1':
print(num1,"+",num2,"=", add(num1,num2))
elif choice == '2':
print(num1,"-",num2,"=", subtract(num1,num2))
elif choice == '3':
print(num1,"*",num2,"=", multiply(num1,num2))
elif choice == '4':
print(num1,"/",num2,"=", divide(num1,num2))
else:
print("Input non valido")
ahah
nice calculator
Thanks, but it's in italian XD
nice calculator π€ π₯
right now I am coding a simulation of a village using machine learning
that calculator was simply a test to use the ` `` py
very good calculator
is that like a diary of someone?
it's a fun problem
give it a shot if it looks interesting
it's a simulation of a population of fish growing
my old solution: ||```py
https://adventofcode.com/2021/day/6
import requests
cookie = open('.config', 'r').read()
r = requests.get('https://adventofcode.com/2021/day/6/input', cookies=dict(session=cookie))
population = [int(i) for i in r.text.replace('\n', '').split(',')]
def part1():
pop = population.copy()
for _ in range(80):
for i, fish in enumerate(pop):
if not fish:
pop[i] = 6
pop.append(9)
else:
pop[i] -= 1
return len(pop)
def part2():
pop = [0]*9
for i in population:
pop[i] += 1
for _ in range(256):
pop.append(pop[0])
pop[7] += pop[0]
pop.pop(0)
return sum(pop)
if name == 'main':
print(part1())
print(part2())
@jaunty turret
hola
A lawyer showed up to virtual court in the 394th district of Texas with a kitten filter turned on, the cat moving its lips and eyes, as Rod Ponton said he and his assistant were attempting to remove the filter during the court case.
The judge later posted the snipped and wrote: 'If a child used your computer before you join a virtual hearing, c...
this is peak imo
hate the new subaru fenders
so ugly imo
didn't take you for a car person, yoon
header line 1:
Promo Promo Event Commit Co-op Co-op Cost Promo Deal Unit DC Mfr Rebate Rebate Deal Deal Pts Mfr
header line 2:
Date Type Id Id Account Amount Area Type Dist Pbk Rebate Start End Start End Area Type Pts/Mult
'25-NOV-23', 'F', 'P3K25D', 'A272439', 'NATL', 'ALL', 'DC', 'Y', '0.83', '25-NOV-23', '01-DEC-23', 'NATL', 'ALL', '2500', 'P01'
not many people do but cars do be cool
gimme a porsche 911 gt3 rs and i'll be a happy boy
992 ofc
Heyooo
How yall doin?
I've been in the server for a while but it was pretty slow :'3
What programming do you do? Python I assume? If so, have you tried anything else?
professionally or amateur stuff?
I do Javascript, python, C#, HTML5, and CSS
Just anything lol
Even if you're learning
Yee
I'm learning 5 programming languages and 5 actual languages lol
Does that count as 10? XD
German, French, Japanese, Spanish, and Swedish
Whatcha up to?
What's up?
Can't believe I have to voice verify :'3
Can't even talk until I text
a farmer is being interviewed about his cows
Interviewer: How much milk do these cows give?
Farmer: Which one? The Black one or the brown one?
Interviewer: Brown one.
Farmer: A couple of litres per day.
Interviewer: And the black one?
Farmer: A couple of litres per day.
Interviewer(naturally a bit flummoxed): I see. What do you give them to eat?
Farmer: Which one? Black or brown?
Interviewer: Black.
Farmer: It eats grass.
Interviewer: And the other one?
Farmer: Grass.
Interviewer(now annoyed) : Why do you keep asking which one when the answers are the same?!
Farmer: Because the black one's mine.
Interviewer: Oh, and the brown one?
Farmer: It's also mine
its weird
!paste
If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.
this seems odd
https://paste.pythondiscord.com/LCPA#1L16-L16
self instead of BankAccount.owner
casting to int is unnecessary, len raises on non-int values
https://paste.pythondiscord.com/LCPA#1L12-L13
I guess self._ is just something not implemented yet
https://paste.pythondiscord.com/LCPA#1L32-L32
BankAccount.owner probably shouldn't be Customer
or else you get circular dependency
ah, nvm, the diagram says to have it this way
just know that it's incorrect for real apps
you can have circular imports but you must not use from import
it's more or less obvious what the code does
it's just that
https://paste.pythondiscord.com/LCPA#1L32-L32,2L2-L2
import customer
class BankAccount:
def __init__(self, owner: customer.Customer, first_deposit: float, interest: float):
...
should help with circular import sometimes
might also require rewriting this to use import bank_account
https://paste.pythondiscord.com/LCPA#1L1-L1,2L2-L2
I don't remember if from __future__ import annotations helps there
probably not
(because the errors comes from imports)
it only helps within a module
!e
class C:
def m(self) -> C:
pass
@vocal basin :x: Your 3.12 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 1, in <module>
003 | class C:
004 | File "/home/main.py", line 2, in C
005 | def m(self) -> C:
006 | ^
007 | NameError: name 'C' is not defined
!e
from __future__ import annotations
class C:
def m(self) -> C:
pass
@vocal basin :warning: Your 3.12 eval job has completed with return code 0.
[No output]
is_withdraw_money is very odd
is_ methods in regular OOP must never have side effects
is_ is a question whether the instance "is something"
not a request to change something
stop importing circularly
circular imports are okay within certain limitations
you might still need this
from __future__ import annotations
just an example
important parts are:
import module instead of from module import Class
from __future__ import annotations
both ensure you don't access partially initialised members of a module
is there a way for me too have for i in range of a word and have the i being two letters
alwyas
always*
pairs of letters of a word, right?
yes
abcde -> ab bc cd de?
!e
from itertools import pairwise
for a, b in pairwise("abcdef"):
print(a, b)
@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | a b
002 | b c
003 | c d
004 | d e
005 | e f
but I cant apply that (or atleast I dont know how to)
this doesn't require using range
works with any iterable (str, list, range, etc.)
okay
thank you
also
is there a way for me to have the next i used in a for loop?
so for example i + second i = a string with i and the second i
ah no cuz the last time it loops it wont have one
if I was designing it, I'd probably do something like this
class BankAccount:
def get_owner(self, /) -> weakref.ref[Customer]: ...
def get_balance(self, /) -> decimal.Decimal: ...
def get_type(self, /) -> AccountType: ...
# ^^^^^^^^^^^ subclass of enum.Enum
def get_interest(self, /) -> decimal.Decimal: ...
def set_interest(self, interest: decimal.Decimal, /) -> None: ...
def deposit(self, amount: decimal.Decimal, /) -> None: ...
def withdraw(self, amount: decimal.Decimal, /) -> None: ...
# ^^^^ raises an exception on failure
def __str__(self): ...
yeah
it's sad that it's so wrong
*deposit
it's named with is just because it returns bool
cargo cult naming
it should be named try_ not is_
yo
!e
from itertools import chain, pairwise
for current, next_ in pairwise(chain("abcdef", [None])):
print(current, next_)
@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | a b
002 | b c
003 | c d
004 | d e
005 | e f
006 | f None
I guess this can be used
C++ and C# are natively object-oriented
much of C code is object-oriented
that's what I thought too
pip sometimes requires elevated permissions
i'm running it from a server account with admin permissions
but when I open a file with open(path, 'w')
it says no such path
so if i spawn a shell as admin
it should work
right
because that's what I did
right
but if you open a file in write mode
does parent directory exist?
alisa is a gigachad
printing it shows the correct path too, right?
right
can you check if the parent of the path exists?
i wanna switch from windows but im scared ill get compatibility issues with games on linux
from python
yes I explicity did
Pasted into notepad and it all lines up π
deep voice club
heisenburger
!e
class A:
def a(self):
print('a')
def __b(self):
print('b')
def c(self):
self.a()
self.__b()
A().a()
A().c()
A().__b()
@vocal basin :x: Your 3.12 eval job has completed with return code 1.
001 | a
002 | a
003 | b
004 | Traceback (most recent call last):
005 | File "/home/main.py", line 14, in <module>
006 | A().__b()
007 | ^^^^^^^
008 | AttributeError: 'A' object has no attribute '__b'
!e
class A:
def __b(self):
print('b')
A()._A__b()
@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.
b
it's not exactly for hiding values
more of a convenience feature
!e
class A:
def __a(self):
print('a')
def a(self):
self.__a()
class B(A):
def __a(self):
print('b')
def b(self):
self.a()
self.__a()
B().b()
@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | a
002 | b
rm --just-fuck-my-shit-up
is Scratch OOP?
well, it's "composable"
lambda calculus is OOP
bash is OOP because it deals with processes and implicit interfaces
all
any
every definition
or some
degree in part is about being able to do the same (not necessarily interesting) thing for 4+ years
"fix"
i had a similar thing telling me meta classes were scary and to check with someone else before committing
__init_subclass__ is simpler to use in some circumstances (compared to metaclasses)
work (Rust)
contract
local
until the end of November
and after that, maybe some more months
I remembered I have this cursed program
(bash-style pipelines)
print(p_str("y\n" * 100) | str.upper | ["head", "-n", "3"])
print(p_run("yes") | str.upper | ["head", "-n", "3"])
print(p_run("yes") | str.upper | "head -n 3")
only 300~400 lines of code
it can also use > for files
sadly can't input > process > output
needs parentheses
print(p_str("abc\nbca\ncab") | "grep ab")
abc
cab
print(__file__ > PopenPipeline("grep", "while"))
output:
# while True:
print(__file__ > PopenPipeline("grep", "while"))
also found a weird attempt at modelling monads in Python
time to make it even weirder
yo
!e
def test(f):
f(5)
test(print)
@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.
5
@functools.cache(user_function)```
Simple lightweight unbounded function cache. Sometimes called [βmemoizeβ](https://en.wikipedia.org/wiki/Memoization).
Returns the same as `lru_cache(maxsize=None)`, creating a thin wrapper around a dictionary lookup for the function arguments. Because it never needs to evict old values, this is smaller and faster than [`lru_cache()`](https://docs.python.org/3/library/functools.html#functools.lru_cache) with a size limit.
For example...
!d functools.reduce
functools.reduce(function, iterable[, initializer])```
Apply *function* of two arguments cumulatively to the items of *iterable*, from left to right, so as to reduce the iterable to a single value. For example, `reduce(lambda x, y: x+y, [1, 2, 3, 4, 5])` calculates `((((1+2)+3)+4)+5)`. The left argument, *x*, is the accumulated value and the right argument, *y*, is the update value from the *iterable*. If the optional *initializer* is present, it is placed before the items of the iterable in the calculation, and serves as a default when the iterable is empty. If *initializer* is not given and *iterable* contains only one item, the first item is returned.
Roughly equivalent to:
Python probably supported it since 1.0
this site claims to run python 1
it's often easier to have higher-order functions than not to have them
especially for an interpreted language
how come?
by not having to introduce functions as some special concept
functions pointers are just regular values in C
SQL is the case where I wouldn't expect it
because it has a very unusual representation
that supports half of being higher-order
specifically taking other functions as arguments
but not returning
where does being interpreted make it easier to have higher order functions?
or how does it relate
compilation is what makes hard it to create new functions at runtime in C
unlike Rust, it doesn't have advanced support for generics
I've re-implemented Control.Monad from Haskell in Rust
for practical reasons
the project isn't public still
IO T is just Box<dyn 'static + Send + Future<Output=T>> in most circumstances
for something more Haskell-ish, Shared<Box<dyn 'static + Send + Future<Output=T>>>
because Haskell just assumes you can clone everything
A collection of specific ways to improve your use of Rust
both come from ML
meta language
1973
Rust used to be implemented with OCaml
I've started learning Erlang at some point
I tried F# (mostly to see how well it interacts with C#)
F# doesn't really have a notion of C#-like classes
and the thing, that I was working on, was very stateful
and function prefers to abstract away the statefullness
C# received improved pattern matching and other functional features recently (within last ~5 years)
that C# project, that I worked on in 2017~2022, got rewritten in function style towards the end of its development
at least partially
it wasn't as much about boilerplate as it was about the code working at all
size didn't necessarily reduce but it definitely became easier to change
i bet
I've recently tried to help someone with Kotlin
but failed
there was some dependency/compile config issue, apparently
and that's something I know nothing about in JVM
i meet very little people who dabble with kotlin
is it oop or mix paradigm?
i have no experience with it in any of my works
juiced up polymorphism
ah, nvm, "something trait-like" was from Swift
(Protocols)
maybe Kotlin does have something similar too
I didn't watch this but it's probably a good video explaining the differences
https://www.youtube.com/watch?v=E-2y1qHQvTg
C++ Concepts
Haskell Typeclasses
Rust Traits
Swift Protocols
EVENT:
Meeting C++ 2020
SPEAKER:
Conor Hoekstra
PUBLICATION PERMISSIONS:
The author provided Coding Tech with the permission to republish this video.
Become a more effective Developer by using Kite!
Kite is a free AI-powered coding assistant that will help you code faster a...
I'll probably start publishing some parts soon
there's at least two things that can be separated as standalone libraries
(specifically parsing and functional tools)
this is probably the most compact AVL balancing implementation I've ever written
which is enabled by the fact all the abstractions in place
https://gist.github.com/afeistel/6b107dd1a36da6def2001de88c096d7f
(part of that project)
assume_bind should probably be renamed to force_split
gtg take it easy
I also made this (mostly to remind myself how to solve such things)
https://parrrate.github.io/exercises/
hey opal
sorry its 1:40am here
I had my volume off
its on now
I wasn't apologising forr the time, I meant because I missed wwhat you said
holdon
@humble sail π
Yo
Hell
Hello
What'S up?
So is this server about python or what?
AHHHH
SHIT I'M IN THE WRONG SERVER
oh really
Are links allowd in this server?
I have this 2009 machine under my feet
should i boot it up dand install windows on it
i meant linu
its got windows 10 32 bits
cus no 64 bits
It was on vista
The UwU
I trited
i tried
didnt work
I use repl.it for my projects
is good?
Links, in and of themselves, are fine.
Flooding/spam/inappropriate, however, less so.
shit
ok
are swear words allowed?
oki
but no filter?
wow we can even upload pictures
lol
this server is so different than most community servers
The principle of FAFO applies.
Alr
See #rules and #code-of-conduct for more information.
Enforcement is simultaneously relaxed and strict. Overarching rule of thumb, don't be an arsehole.
I dont think ive ever read the rules of a server
Staff will be understanding of mistakes made in ignorance, but not malice.
man you're edgy
@umbral cape @proper grove ive seen "women"
Until you see someone irl that you've met online, they are a man.
EVen after you'Ve met them ._.
People would lie and say that they are women
in the poll
lol
*do
welcome to the internet
you ever been on here?
No.
no you
What's a program
so no
you should learn a programming language
I'm here for the snakes
you want resources?
lol are you a pdfphille
w3school good for beginners
π₯
do you want pdfs and books
cuz you're clearly underaged and if you start young, you'll become a genius by the time you're 18
cuz you started programming way earlier
You have no proof of that
your behavior shows it lmao
stop tyina hack my webcam server
thats all the proof I need
I might be 18...
yeah but you're not
bro what?
do you want pdfs or books
Mhm
or not
@raven mural what is wrong with you
huh
I can get my own ressources anyways
i'm 13
wdym
start programming now man
you got a lot of free time
seriously
it
it'll go a long wayu
Ok~~
i really wish I started that young for programming
here i'll dm you a python3 primer
:3 ~~~~
WAIT
THAT CAME OUT WRONG IN TEXT
?
@proper grove
teacher me
Everything
I want you to learn me assembly @proper grove
I want you to learn me binary
i want binary with 9 and 5
wanna learn hex
I already know ex deimal
Hack the pdfs
hack in the pfdsfs
and
ivurs me
@proper grove I got hack from downlaod stuff on internet
i have to buy new compouter
@raven mural yea but have you seen python structure compared to c π
c is like not even comprenhesible
@raven mural Roblox is Ulua
not lua
i meant
luau
i put the u at the wrong place
roblox π₯
@raven mural Ive never learnt from a youtube video
its just repeat and
no learning
The most ive leanred
is when working on a project and fixing stuff
I decided to run a js website with python
cus i love myself
Also i use repl.it to program everything
i'm not 13
i said that as a joke
I mean at 13 i did know what it was
just not as much
i still know know much though
@raven mural @proper grove 1st ever python program that i acutally put time in
def Grandma():
global grandmaAmount
global grandmaCost
global cookies
global grandmaCps
if cookies >= grandmaCost:
grandmaAmount += 1
cookies = cookies - grandmaCost
grandmaCost = grandmaCost * 1.2
grandma_text = "You have "+str(grandmaAmount)+" grandmas!"
grandmabutton_text = "Grandma Costs "+str(grandmaCost)
grandmalabel.config(text=grandma_text)
grandmabutton.config(text=grandmabutton_text)
print(grandma_text)
print(cookies)
if grandmaAmount == 1:
b = threading.Thread(name='background', target=GrandmaCookies)
b.start()
def GrandmaCookies():
global cookies
global grandmaAmount
while grandmaAmount > 0:
cookies = (cookies + (grandmaAmount * multiplier))
time.sleep(1)
print("Grandma made "+str(cookies))
cookieamount_text = "You have "+str(cookies)+" Cookies"
cookielabel.config(text=cookieamount_text) # Change the text of the label
cookielabel = Label(root, text="You have 0 cookies", padx=25, pady=10)
cookielabel.pack()
cookiebutton = Button(root, text="This is a cookie", padx=25, pady=25, command=CookieButton, bg="brown", fg="white")
cookiebutton.pack()
multiplierlabel = Label(root,text="Multiplier is 1", padx=25, pady=10)
multiplierlabel.pack()
multiplierbutton = Button(root, text=" Buy multiplier: 10", padx=25, pady=25, command=MultiplierButton)
multiplierbutton.pack()
grandmalabel = Label(root, padx=10, pady=10, text="You have 0 grandmas")
grandmalabel.pack()
grandmabutton = Button(root, text="Buy a grandma: 100", padx=10, pady=10, command=Grandma)
grandmabutton.pack()
receiptFrame = Frame(root, width=500, height=100)
receiptFrame.pack()
root.mainloop()
what is it
is cookie clicker
with gui
i know python is not amde for gui
so i stopped
and made more text based things
@proper grove This was my 1st EVER try at python
2-3 years ago
1-2 years
i mean
idr
i have shit memory
here this one is a bit more recent its a hangman thing
import random
import os
def cls():
os.system('cls' if os.name == 'nt' else 'clear')
def generateWord():
cls()
word_list = ['architecture', 'astronomy', 'basketball', 'butterfly', 'calendar', 'camera', 'chocolate', 'coffee', 'computer', 'crocodile', 'dinosaur', 'education', 'elephant', 'engineer', 'finance', 'fireman', 'guitar', 'hamburger', 'helicopter', 'history', 'hospital', 'hotel', 'ice cream', 'internet', 'keyboard', 'language', 'library', 'literature', 'magician', 'mathematics', 'microphone', 'microscope', 'mountain', 'music', 'newspaper', 'octopus', 'orchestra', 'painting', 'pandemic', 'penguin', 'pizza', 'planet', 'police', 'popcorn', 'rainbow', 'restaurant', 'river', 'robot', 'rocket', 'sailboat', 'science', 'seagull', 'shark', 'soccer', 'spider', 'stationery', 'strawberry', 'submarine', 'superhero', 'sushi', 'swimming', 'telephone', 'television', 'tennis', 'theater', 'thermometer', 'thunderstorm', 'tiger', 'tomato', 'toothbrush', 'tornado', 'train', 'treasure', 'trumpet', 'turtle', 'unicorn', 'university', 'vacation', 'vegetable', 'volcano', 'watermelon', 'weather', 'website', 'whale', 'windmill', 'winter', 'wizard', 'wolf', 'yogurt', 'yoyo', 'zebra', 'zoo', 'astronaut', 'avalanche', 'bakery', 'basketball', 'carpenter', 'caterpillar', 'dentist', 'dinosaur']
randomWord = random.choice(word_list)
#why did you global misses cus like why not
global misses
misses = 0
letters = list(randomWord)
originalLetters = letters
guessedLetters = []
showList = ["_"] * len(originalLetters)
print(showList)
while len(letters) > 0:
print(originalLetters)
guess = input("Imput a letter or a word:\n")
if guess.lower() == randomWord:
break
elif guess in letters:
cls()
glettersPos = originalLetters.index(guess)
print(glettersPos)
showList[glettersPos] = guess
print(showList)
print("You found "+guess)
guessedLetters.append(guess) # append is just insert but it puts the thing at the end
letters = [i for i in letters if i != guess]
continue
elif guess in originalLetters and guess not in letters:
cls()
print(showList)
print("You have already guessed that letter, there are "+str(len(letters))+" letters left in the word")
continue
else:
cls()
print(showList)
print("That letter isint in the word, try again. There are "+str(len(letters))+" letters left in the word")
misses += 1
continue
cls()
print("wow you win, the word was '"+randomWord+"'\nYou guessed inconrecely "+str(misses)+" times!")
@proper grove more recent try
ok so its broken
when there are 2 of the same letter it only puts the 1st one
import random
import os
import time
def cls():
os.system('cls' if os.name == 'nt' else 'clear')
def askDifficulties():
global difficulty
difficulty = input("\nWhat's the difficulty?\nChoices: Easy, Hard, Insane, Another\n\n")
GuessAnumber()
def GuessAnumber():
global difficulty
global randomNumber
global interval
if difficulty.upper() == 'EZ' or difficulty.upper() == "EASY":
randomNumber = random.randint(1,100)
interval = "1 to 100"
start()
elif difficulty.upper() == 'HD' or difficulty.upper() == "HARD":
randomNumber = random.randint(1,1000)
interval = "1 to 1000"
start()
elif difficulty.upper() == 'IN' or difficulty.upper() == "INSANE":
randomNumber = random.randint(1,10000)
interval = "1 to 10000"
start()
elif difficulty.upper() == 'AT' or difficulty.upper() == "ANOTHER":
randomNumber = random.randint(1,100000)
interval = "1 to 100000"
start()
else:
askDifficulties()
def start():
cls()
global randomNumber
global interval
guessedNumber = 0
while randomNumber != guessedNumber:
guessedNumber = input("Guess a number between "+interval+": \n")
if not guessedNumber.isnumeric():
print("Invalid input. Please enter a number.")
time.sleep(1)
cls()
guessedNumber = 0
continue
int(guessedNumber)
if int(guessedNumber) > randomNumber:
cls()
print("Try lower")
time.sleep(1)
if int(guessedNumber) < randomNumber:
cls()
print("Try higher")
time.sleep(1)
if int(guessedNumber) == randomNumber:
print("Wow you win")
break
```
what about this one
public static int getGoodInt(){
int someNum;
boolean condition= false;
Scanner kb = new Scanner(System.in);
while (condition == false) {
System.out.println("Enter a positive integer");
someNum = kb.nextInt();
try {
if (someNum < 0) {
throw new Exception("number is not positive");
}
condition = true;
} catch (InputMismatchException e) {
System.out.println("incorrect type");
} catch (Exception b) {
System.out.println(b.getMessage());
}
}
return someNum;
}```
explain whats happening here :3
@proper grove does'nt java and js read the entire code and then run it
and then python reads it top to bottom
Yall major in programming
???
Y'all is this book worth reading? : https://eloquentjavascript.net/index.html
template <typename T = uint8_t>
inline AdjList createAdjList(Graph<T> & graph, const std::string f){
int ncount = 0;
const std::regex match("\\d, \\d");
// nodeID : targetnode, weight
AdjList l;
std::string line = "";
std::ifstream file;
file.open(f);
while(std::getline(file, line))
{
std::size_t pos = line.find(":");
std::string nodeID = line.substr(0, pos);
std::queue<std::string> queue;
std::smatch results;
std::string capture = "";
std::regex_token_iterator<std::string::iterator> rend;
std::regex_token_iterator<std::string::iterator> a (line.begin(), line.end(), match);
while (a != rend){
queue.push(*a++);
}
AdjLine adjline;
adjline.first = *nodeID.c_str();
while (!queue.empty()) {
std::string elementcapture = queue.front();
queue.pop();
std::size_t first = elementcapture.find(",");
std::string targetnode = elementcapture.substr(0, first);
std::string targetweight = elementcapture.substr(first+1, elementcapture.size());
std::pair<char, char> adjpair(*targetnode.c_str(), *targetweight.c_str());
adjline.second.emplace_back(adjpair.first, adjpair.second);
}
l.push_back(adjline);
}
l.erase(l.end());
return l;
}
template <typename T = uint8_t>
using GraphSet = std::pair<std::vector<Node<T>*>, std::vector<Edge<T>*>>;
// ADJLIST = SET ( NODEID, SET ( NODEID, WEIGHT ))
using AdjList = std::vector<std::pair<char, std::vector<std::pair<char, char>>>>;
using AdjLine = std::pair<char, std::vector<std::pair<char, char>>>;
whats that program for btw
self.barrel_xF, self.barrel_yF = self.rect.centerx + (((self.rect.width)/2)*math.sin(b_angle)) , self.rect.centery + (((self.rect.height)/2)*math.cos(b_angle))
AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH!!!!!!!!!
Break it up.
wilco
Put it on two or even four lines.
kl kl
almost had an anrysmm
(((self.rect.width)/2)*math.sin(b_angle)),
self.rect.centery +
(((self.rect.height)/2)*math.cos(b_angle))) ```
Im the 'r' word
!stream 1157723305265078272
β @astral coral can now stream until <t:1698747860:f>.
@opal kiln π
@somber heath π
chilling
@whole bear hello hru? can you hear me
you chillin? thought you were coding or something?
reading but yeah
Nice meal man!
Guys how can I get the permission to share my screen during a voice chat to get coding help?
@rugged root are you around I could use some help with errors and understanding how to use them
Like key errors
Can I get a source recommendation for learning python but for science, specifically learning math packages?
This is pretty good: https://www.kaggle.com/learn/
Practical data skills you can apply immediately: that's what you'll learn in these no-cost courses. They're the fastest (and most fun) way to become a data scientist or improve your current skills.
!stream 1059933386669555814
β @lofty crater can now stream until <t:1698777772:f>.
!e
byte_string = b'utah bread'
print(type(byte_string), byte_string)
string = byte_string.decode("utf-8")
print(type(string), string)
@desert vector :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | <class 'bytes'> b'utah bread'
002 | <class 'str'> utah bread
!stream 1059933386669555814 1h
β @lofty crater can now stream until <t:1698781912:f>.
hello
public
{
}
public {
}
int x = 10;
int &ref = x; // Reference to x
int x = 10;
int *ptr = &x;
ptr = &someOtherVariable;
Answer (1 of 8): You can say that C++ is superset of C. It will be most of the time correct.
However correct answer is C and C++ are two different languages.
Consider this code:
[code ]char *s = malloc(100);[/code]
This is correct C code, but in C++ this code is invalid. This is because mallo...
ffs
I'm going to go, I have work to do and friends to meet later
I used Python for prototyping some data structure stuff
@whole bear I'd say C is more useful for learning how data structures work in detail
That seems to be the case, since it really makes you think about the implementation, right?
yes
and then you'd be using abstractions other languages provide on top of that
another thing to study is how functional languages treat data structures
specifically with algebraic data types
that giving better tools to represent problems with data while not worrying about low-level details
Oh, yes, that's very similar to what I want to do. I want to study data structures in C and then pure functional data structures
and then there's Rust which operates at C level but provides Haskell-like type system (though less concise)
the issue is that for now I have to do these courses in Python and Java for school purposes π
didn't know that. defintely makes Rust very intriguing
I've been recently rewriting one of those prototype systems from Python to Rust
You looks like philipippinines
@tight oar π
Im back
hi
π’
Hello @somber heath
In set theory, ZermeloβFraenkel set theory, named after mathematicians Ernst Zermelo and Abraham Fraenkel, is an axiomatic system that was proposed in the early twentieth century in order to formulate a theory of sets free of paradoxes such as Russell's paradox. Today, ZermeloβFraenkel set theory, with the historically controversial axiom of ch...
the Philippine flag doesn't have any orange
@solemn swan π
@cunning burrowhi
i`m here to find out how to correct my code
can`t find out solution for 14 hours
!code
yep,i gonna type some info with screens now
sometimes taking a break and coming back to the code works wonders
voice chat verification
!voice
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
50 messages and 3 days. it avoids spammers
It doesn't matter.
So I do some bot stuff(started 3 days ago)
I use telebot for that. The aim of the function that i do now is to change the parameters of the bot(that stores those params in dictionary because I think its a good solition for that task). In fact that function starts working if user starts specific command then it asks what should be changed then it goes for function that changes it. the first creens starts that all and in the last screen is the place where it finishes but i cant do something with this, my dict doesnt update :( (The ru language is just for choices from user it doesnt affect on code)
Should i leave text code here ? because it`s a huge peace of code...
if you're new to python, flask is probably easier.
if you're just making some crud app or something, probably flask.
This isn't something I can help with.
a hard one task π
@cunning burrow what project you are workin on??
@solemn swan Django is probably more useful professionally, takes a lot more to learn, and requires more base knowledge of various things
I have a mouth, and cannot scream
!voice
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
Thank you sir
It's the "bone doctor" from Hunt:Showdown
its 3am and my girl is asleep
Not an amazing game, but good art
lol
this community so enganing damn!!!
i woke up early to work on school
@cunning burrow i am assuming you load your dict with parameters at startup, then dont reload the updated dict
What holiday is it?



