#voice-chat-text-0
1 messages · Page 983 of 1
wiki @prisma heron
compiler
yeah 50 messages
who who
hhh
no
websocket
struct
join channel
json or xml
java xml
django asgi is the futur
gn
this is one of my projects
https://github.com/ProgrammingNerdGit/Sockets
he means scripts
ik
im just showing an example on how sockets in c work
#include <sys/socket.h>
#include <stdio.h>
const char* HOST = "www.google.com";
const int PORT = "80";
int main(){
int conn = socket(PF_INET, SOCK_STREAM, 0);
// get host info
struct hostent *host;
struct sockaddr_in addr;
host = gethostbyname(HOST);
memset(&addr, 0, sizeof(addr)); // clear address
addr.sin_family = AF_INET;
addr.sin_port = htons(PORT);
addr.sin_addr.s_addr = *(long*)(host->h_addr);
connect(conn, (struct sockaddr*)&addr, sizeof(addr));
// send bytes
const char* msg = "GET / HTTP/1.1\n\n";
send(conn, msg, strlen(msg), 0);
// recv bytes
char recvBytes[1024] = {0};
recv(conn, recvBytes, 1024, 0);
// print msg
puts(recvBytes);
}
@left badge
!kindling
Kindling Projects
The Kindling projects page on Ned Batchelder's website contains a list of projects and ideas programmers can tackle to build their skills and knowledge.
https://www.youtube.com/watch?v=zc1loX80TX8&t=5111s since you wanted to do Front-End
Do you want a FREE Training on How to Build the Netflix Clone?
https://event.webinarjam.com/register/2/ow7o4fm?utm_campaign=live-every-day&utm_source=youtube&utm_medium=yt-description&utm_content=sonny-discord-8-oct
In today's video, Sonny AKA papa React is BACK and he is building the highly anticipated DISCORD clone. Let's go!!!
BUCKLE UP ...
Eyes, arse, ass, us, ice.
Doom scrolling.
News.
Doomscrolling or doomsurfing is the act of spending an excessive amount of screen time devoted to the absorption of negative news. Increased consumption of predominantly negative news may result in harmful psychophysiological responses in some.
🔫
Mm.
can someone help
I don't understand why my code is not running correctly it did say index out of range
LMFAO
yeah
def usernamecheck():
r = requests.get(f'https://www.solo.to/{username}', proxies={"http": 'http://' + random.choice(proxies)})
try:
if r.status_code == 404:
print(f" [{Fore.LIGHTGREEN_EX}+]{Fore.RESET} Username: {username} Available")
with open('available.txt', 'a') as f:
f.write(username + '\n')
elif r.status_code == 200:
print(f" [{Fore.LIGHTRED_EX}-]{Fore.RESET} Username: {username} Not Available")
except:
print("issues somewhere")```
it was saying right here I believe
r = requests.get(f'https://www.solo.to/{username}', proxies={"http": 'http://' + random.choice(proxies)})
but now it's not saying anything
my name is austin
oh
username = open('./usernames.txt', 'r').read().splitlines()
proxies = open("./proxies.txt").read().splitlines()
pip install requests
yeah
Traceback (most recent call last):
File "c:\Users\Ecasm\Desktop\Solo Checker\main.py", line 79, in <module>
threading.Thread(target=usernamecheck()).start
File "c:\Users\Ecasm\Desktop\Solo Checker\main.py", line 41, in usernamecheck
r = requests.get(f'https://www.solo.to/{username}', proxies={"http": 'http://' + random.choice(proxies)})
File "C:\Users\Ecasm\AppData\Local\Programs\Python\Python39\lib\random.py", line 346, in choice
return seq[self._randbelow(len(seq))]
IndexError: list index out of range```
wait I didn't see that
if __name__ == "__main__":
time.sleep(1)
ProxyScraper()
os.system('cls||clear')
print(banner)
for i in range(10):
threading.Thread(target=usernamecheck()).start```
what line
return seq[self._randbelow(len(seq))]
I don't have code in there like that
ohhh wiat
wait
no still not working
no error code just stops
def ProxyScraper():
os.system('title Solo.to Checker ^| Scraping proxies...')
print('Scraping proxies...')
f = open("./proxies.txt", "a+")
try:
r = requests.get("https://api.proxyscrape.com/?request=displayproxies&proxytype=http&timeout=5000")
for proxy in r.text.split("\n"):
proxy = proxy.strip()
if proxy:
f.write(str(proxy)+"\n")
f.close()
print(f"{Fore.GREEN}[{Fore.RESET}SUCCESS{Fore.GREEN}]{Fore.RESET} Successfully scraped proxies.")
os.system(f'title Solo.to Checker ^| Successfully scraped proxies')
time.sleep(1)
os.system('cls||clear')
print(banner)
except:
print(f"{Fore.RED}[{Fore.RESET}ERROR{Fore.RED}]{Fore.RESET} Unable to scrape proxies, please try again later.")
input(f"\n Press enter to continue...")
exit()```
it scrapes proxies just fine
proxies
^
yeah hold on
it basically just prints
['1.15.182.239:7890\n', '103.138.41.132:8080\n', '101.109.255.17:43501\n', '1.186.85.46:80\n', '1.180.156.226:65001\n', '100.19.135.109:80\n', '1.214.62.103:8000\n']
@willow lynx python -m pip install requests
!e
import random
print(random.choice(['1.15.182.239:7890\n', '103.138.41.132:8080\n', '101.109.255.17:43501\n', '1.186.85.46:80\n', '1.180.156.226:65001\n', '100.19.135.109:80\n', '1.214.62.103:8000\n']))
@past elk :white_check_mark: Your eval job has completed with return code 0.
101.109.255.17:43501
I am working in a virtualenv
Best not.
Best not.
!e py import random choices = [] random.choice(choices)
@somber heath :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 3, in <module>
003 | File "/usr/local/lib/python3.10/random.py", line 378, in choice
004 | return seq[self._randbelow(len(seq))]
005 | IndexError: list index out of range
@whole bearHave you checked that you're populating proxies?
Hm. Okay.
You did? Maybe? But anyway.
For whatever reason, come the time of the call to random.choice, it looks like it might be empty.
I don't know how to do that
Are you creating the proxies variable within a function?
Hm. Anyway. I just realised this is a scraping thing, which is potentially of dubious TOSishness.
So I'll just say good luck.
Hello everyone, I have a question. I want to send python socket data to a javascript web browser how do I do that? What keyword do I have to search on the internet?
Is it your intention to have Python running, and connect to a listening socket on a javascript application running on a browser?
Or have a Python server that is connected to by the javascript application?
I have python server and want javascript browser connect to python server
I want to stream video from a python server to a web browser
patreon: http://patreon.com/billwurtz
spotify: https://play.spotify.com/artist/78cT0dM5Ivm722EP2sgfDh
itunes: http://itunes.apple.com/us/artist/bill-wurtz/id1019208137
twitter: http://twitter.com/billwurtz
instagram: http://instagram.com/notbillwurtz
donate: http://paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_but...
Feels relevant.
Ill brb
@past elk which language are you using to make that?
Going to look at the birdies.
try:
a = menu.run()
if a == 'level':
level.run()
del menu
except:
level.run()```
good morning
watsup
hi
i am not voice verified
only thing left is 50 chats lol
!voiceverify
you good in js and html?
yeah i got it
i wanna make a website for a formfilling so basically i need help - if someone input details in other language it will be automatically convert to english
ummhmm
i see
ah all good
what os are you using?
lol
i will be going now bye and thanks :D
i am very bad in english LOL anyways cya later i gtg
2012-09-01T17:39:05Z
# list containing all light data
LitLightList = [Vec4(1), Vec4(0)]
class LitPointLight():
def __init__(self, position = Vec3(0), color = Vec3(1), range = 20, intensity = 1):
self.listIndex = len(LitLightList)
self.position = position
self.color = color
self.range = range
self.intensity = intensity
LitLightList.append(Vec4(color.x, color.y, color.z, range))
LitLightList.append(Vec4(position.x, position.y, position.z, intensity))
def remove(self):
LitLightList.remove()```
me too
del self
!e py my_list = ["apple", "pear", "grape", "pear"] my_list.remove("pear") print(my_list)
@somber heath :white_check_mark: Your eval job has completed with return code 0.
['apple', 'grape', 'pear']
how do use autoupgrade when changing python version
!e py my_list = ["apple", "pear", "grape"] del my_list[1] print(my_list)
@somber heath :white_check_mark: Your eval job has completed with return code 0.
['apple', 'grape']
!e py my_list = ["apple", "pear", "grape"] result = my_list.pop(1) print(my_list) print(result)
@somber heath :white_check_mark: Your eval job has completed with return code 0.
001 | ['apple', 'grape']
002 | pear
Given the involved nature of what you're attempting, I would suggest you use the help channel system. #❓|how-to-get-help
for context on what I am making:
!kindling
Kindling Projects
The Kindling projects page on Ned Batchelder's website contains a list of projects and ideas programmers can tackle to build their skills and knowledge.
yea, and im amazed by how real it looks
Hehehe would be a nice way to scam ppl ;)
thanks
hey guys i needed help with something, do yall mind?
what is it?
its fine
so im very new with learning web d and am wanting to learn back end before i get into the front end, so to learn back end web d should i know html and css as well?
because i was told to just learn javascript
and work with node.js
for web dev, you do need to html, css and maybe js (which is optional)
for backend you can use nodejs (which requires js knowledge), python etc
i too want to do the back end part first
but i think i took the wrong course
would these courses work?
oh sorry
can you guide me to the channel?
thank you so much kind sir
härad
hello guys
whats the hot topic
my room
it is 35 degrees
ah nice
celcius??
yes
ah thats hot
ah it is 15 here so the best temp
hey i am a beginner in this programming world need some advice
back in a bit
okk
actually nvm gtg do stuff

@gentle flint 👋
Guys please help
Big problem
Can somone help me ?
Automatic repair couldn’t repair your pc
Can you help me ?
Windowss
10
Can somone help me please ?
I didn’t. Understand
Can i show you ?
Like on camera ?
Let’s go dms
apparently there are moths in the carpet
Better than Mothra living in your carpet.
How about "Mon Mothma" ?
I did it 3 times
It’s not working
Yes
I tried it
The same thing
What?
No
I installed
Valorant
And it needed to restart
And then
Got this
I don’t have linux
So what i do now ?
Why
It’s not working either
No
I don’t have a second
maybe you see priority download hdd in bios
So what i do ?
Umm
Yes
Can we go dms i can camera you
What ?
Please bro i need some help
you have live cd with windows ?
WHY DO WE NEED TO DM?!
So i can camera him
you need check partitions disk
You might be better off going to a Best Buy's Geek Squad or something.
@barren magnet Give it to a friend who knows computers. Say "Hey. I screwed up. Can you take a look at it?"
Likely that will factory reset & wipe everything
you need to have a friend make you a usb boot stick with your ver of windows10 if the other options did not work, otherwise any further options will remove installed apps or worse your data.
english so hard for me
moths are gone
with a considerable portion of the carpet
Not much of value was lost, then.
That explains a lot
in russians memes have likely this, but with programming languages
understandable
my english so bad guys
well mine too
"In Soviet Russia" jokes are not a good thing to use at this time
im not putin
in Western europe, you complain of Putin
in Ukraine, Putin complain of you
We don't need such jokes here anyways ... no need to stir up any conspiracy theories nor get into any heated debates
+1
excuse my rather crude remark
you are not in VC right now, i guess
yeah please be considerate and mindful of the potential impact of your words
good technologies
intel>ryzen
nvidia>Amd
intel 12th gen is insane
and nvidia gpus are overall better than amds
that 3080 can easily destroy the rx6800xt
but intel dont better cpu of amd ryzen in laptop segments
Grey Hack is a massively multiplayer hacking simulator game.You're a hacker with full freedom to act as you wish on a vast network of procedurally generated computers.File Explorer, Terminal and Text Editor are some of the programs that will be available from the start of the game. As you improve your skills you will find new utilities that you ...
$19.99
799
Open source alternative of gather.town.
hello everyone, i'm new here, i'm still new to programming as well. i hope you can help me and we can get better together!
great! everyone here seems to be super-knowledgeable compared to me, so I'm glad there's another newbie
i'm super newbie hahaha
but it's okay i'm willing to get better!
but there are ways that are easier than others,
and that take less time
more efficient too, probably
is it that hard?
@whole bear bro sorry for talking with you like that, but idk what’s happening today, everything works so bad
Please forgive me and let’s talk
@celest mantle
chickens lay eggs for ~70% of their lifespan
cows give mik for ~30% of their lifespan
Hey all
Rat hepatitis E virus (HEV) is an orthohepevirus which is related to other HEV found in humans and other mammals. It was first identified in Norway rats (Rattus norvegicus) from Germany in 2010, and later it has been detected in Black rats (Rattus rattus) and Norway rats from USA, China, Indonesia, …
GORILLA.BAS: a history of, and how to play the secret MS-DOS game from the '90s: https://t.co/MdqoG9b1ce https://t.co/VNxfVvbF93
124
C16 game
.
Why does this look like Dig Dug ?
or was it Boulder Dash or something?
Hiyo!
Hi 👋
New here. Had a few questions, mind if I pick your brains?
Sure
As someone totally ignorant, I'm getting into Py. As experienced people, what do you find is the best way of picking it up and retaining it?
go through a tutorial, then start a project
I switch between youtube videos and books pertaining to Python.
you'll forget lots of your tutorial stuff, but then you'll remember it while doing your project
Suggest any specific ones?
!resources take a look here
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
Literally what I'm looking for! I appreciate the help :3
!voice
Voice verification
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
I'll get there soon
Yeah 😄
guys they are changing old c to new c in linux kernels in the coming new release
@abstract schooner yeah, I posted a link earlier here
also have a pic of a younger putin
but was that specifically owned by ukraine
yes
guys even include the text channel I don't know when will I get the freedom to speak in vc
russia even overtook control over chernobyl
because its still powers a good handful of cities of Ukraine
they even updated the containment zone so now its safer but still the risk is there and without proper documentation you cant travel there
i am from India
whereabouts in India?
GUYS DID YOU ALL CHECK THE NEWS PUTIN TOLD TO KEEP ALL NUKES OF RUSSIA ON STAND BY AND BE IN CONSTANT SURVEILLANCE THIS IS FEW HOURS AGO
that is what we are discussing
well i personally love the street food and specifically if i have to choose thats gonna be Pav bhaji and Dosas even the kebabs are very del
yes yes just noticed thanks
hey anyone can help me at DBM? i need help about ER diagram
no Russia can not at all survive ww3 and it will just blow up Russians economy Russia rn is not economically sound to go through a war
2 messages til you can voice verify
there you go - or you might be screwed by the rule about message blocks
guys I feel scared thinking about all this I feel anxious thinking all this war stuff what about you all ??
its no longer is that powerful its already under containment zone so really they wouldn't try fidgeting with that
@gentle flint
o
The Russians bomb Kherson (in southern Ukraine) tonight.
@candid venture please keep your posts appropriate for our server
i am hearing this for the first time can you really not access facebook and discord and all in russia ???
i apologize, it was related to the topic, didn't mean to break the rules
@gentle flint do you have any resource from where you brush up your python or your notes ?
basically I just look stuff up when I get stuck
I don't want to be without you
I can't stand the thought of living without you
Every single day I feel incomplete
And I know that I need you in my life
You are the air that I breathe
The light that guides me through the night
Without you, I could not go on
You're my everything and I love you
guys how much time should i give to myself to set a deadline to study ai ml and then start making projects i am done with python now i will start ai ml
124 days 17 hours 23 minutes and 6 seconds
@flat sentinel this thing
Refretted to standard spacing and tuned GG/DD low to high...
Read all about it: https://jakewildwood.blogspot.com/2009/09/c1920-john-bencic-babagazoo.html
seriously ?
how did you all get internships when you were in uni ?? I am right now in 2 nd year so pls guide
guys i am very scared like everyone in my class is very intelligent and they already are like leaps and bounds ahead I feel how will I catch up with them I struggling here learning ai ml and there are my classmates who already have jobs
guys i was told you should be very professional on LinkedIn so tony stark doesn't add up
wife material
@zenith radish - review my PR
it looks soo complicated what you are doing 😦
@zenith radish how long have you been in this field approximately ?
no programming
this is the thing I am printing
use duck duck go
hopefully one day even i would be able to do kind of stuff yall do am very novice tn
rn*
even now i can speak yaey !!!!
Witnesses reported a massive blast in Cherkasy Oblast, Ukraine tonight.
Also video footage from a visible massive explosion that lit up the night was recorded.
The blast apears to be a what is belived to be a thermobaric explosion of a Russian TOS-1 rocket hit on a Ukrainian munitions depot.
This however can not be confirmed at the time.
Sti...
in comments people are calling it out fake few are saying that it was an ammunition dump
its sad that why all this is happening
!e ```py
def f(x: int, /) -> int: return x + 0
print(f(False), f(True))
@primal yacht :white_check_mark: Your eval job has completed with return code 0.
0 1
guys will be back taking a break
f1 = arcsin(x)
f2 = arccos(x)
arcsin(-1) == -(pi / 2)
arcsin(1) == (pi / 2)
arccos(-1) == pi
arccos(1) == 0
@zenith radish drink some water just a reminder
@zenith radish can you be my ai ml mentor pls
how to check in terminal if your device is using tensorflow gpu and not tensorflow
yes we can hear
@cloud stratus are you working in ai ml ?
could you pls be my ai ml mentor pls
like i am learning to start with ai ml so every time i use jupytr notebook to create a new file do i need again import all files like numpy and all
since we already have an env with all installed why we import evertime we make a new file
I'd suggest using kaggle
@zenith radish what is the name of your kitty ?
@zenith radish is a very impressive guy very motivating
i have a pet hamster his name is tora
yes
@zenith radish how old are you if i may ask am 19
wow really very impressive
@cloud stratus what all courses did you do for ai ml ?
Do you want something theoric or practical?
Cuz I started with Andrew Ng's Deep Learning Specialization and I don't think that's what you want :p
How much programming you know anyways?
yes bro
yes bro will definitely go through that course
he used matlab
if i am not wrong
how old are you ?
woah dude thats amazing
i am 19 and still i dont have any internship or nothing and now i am starting with learning ai ml
i am good at python and i wanted to choose a stream and i hate web dev and app dev then i researched more and found ai ml to be more inclined towards my interest and passion
hopefully one day i will get good with ai ml
are you okay ??
i hope nothing concerning
am from india rn its 5:38 am
i want to learn ai ml and improve
rn am watching how to use conda and all
so that i cans start a project
can*
makes sense
BRO i will sleep now i have an exam this morning at 9 so will get some sleep hope to see you soon good night and cheers take care of your back
Hi lol
yoooooooooooooooooooooo guyzzzzz'
I coded a VSCode extension, iOS, and Android dating app designed specifically for coders.
Try it out:
VSCode: https://marketplace.visualstudio.com/items?itemName=benawad.vsinder
iOS: https://apps.apple.com/us/app/vsinder/id1542523079?itsct=apps_box&itscg=30200
Android: https://play.google.com/store/apps/details?id=com.benawad.vsinder
Code: ht...
for fizzbuzz in range(51):
if fizzbuzz % 3 == 0 and fizzbuzz % 5 == 0:
print("fizzbuzz")
continue
elif fizzbuzz % 3 == 0:
print("fizz")
continue
elif fizzbuzz % 5 == 0:
print("buzz")
continue
print(fizzbuzz)
!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.
for fizzbuzz in range(51):
if fizzbuzz % 3 == 0 and fizzbuzz % 5 == 0:
print("fizzbuzz")
continue
elif fizzbuzz % 3 == 0:
print("fizz")
continue
elif fizzbuzz % 5 == 0:
print("buzz")
continue
print(fizzbuzz)
!e
for fizzbuzz in range(51):
if fizzbuzz % 3 == 0 and fizzbuzz % 5 == 0:
print("fizzbuzz")
continue
elif fizzbuzz % 3 == 0:
print("fizz")
continue
elif fizzbuzz % 5 == 0:
print("buzz")
continue
print(fizzbuzz)
@rugged tundra :white_check_mark: Your eval job has completed with return code 0.
001 | fizzbuzz
002 | 1
003 | 2
004 | fizz
005 | 4
006 | buzz
007 | fizz
008 | 7
009 | 8
010 | fizz
011 | buzz
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/ekamebenez.txt?noredirect
@mystic dock ask your question in here please
Sure, I am sorry I am new here.
I am trying to write a recursive function that takes a list of integers as parameter and returns True if sum of 2 numbers from that list is 0 else returns False. So far I've tried:
L = [12,5,10,-5,8]
def inverse_pair(L):
if not L:
return False
else:
if inverse_pair(L[1:])+inverse_pair(L[1:]) == 0:
return True
return False
@mystic dock what
No it should be just True or False. If such a pair exists then True otherwise False
I'd be using the length (len) of the list as your ending check
hey !
I am sorry but by pair I meant any 2 integers which when summed result in 0
@sour imp wait what
You should check for lengths of 1 and 2. When the length of the list is 2, you return if the two values are equal to 0, if it gets to 1, you return false.
Alright, so that should be the base case right ?
Then below you should have a loop that does some recursive actions
Exactly
unfortunately I cannot use loops or builtin funcitons such as "in"
Ok, let me work it out again, still should be the same or similar base case though
for (int i = 0; i < 10; i++){
for (int j = i; j < 10; j++} {...}
}
for i in range(10):
for j in range(i,10):
probably this
range(start,end,skip)
3 args
sure
Can someone help me solve this one: Its been more than 4 hours 😩
Write a recursive function called inverse pair with a single parameter L,
which is a list of integers. The function returns True if L contains a pair of integers
whose sum is zero and False otherwise. The base case occurs when the list has exactly
two integers (since it doesn’t make sense to talk about a “pair” of integers for lists with
fewer than two elements). For example, inverse pair should return False for the list
[12, 8, 10, -5] and True for the list [12, 5, 10, -5, -9]. Your function should
consist only of the base case and the recursive calls. Your
implementation should not contain any loops and may use only the index [] and slice
operators [:] . No other built-in functions may be used. Please note that in
is a built-in function, and you may not use it to implement your function.
!e
L = [12, 5, 10, -5, 8]
def sum(L):
for x in range(len(L)):
for y in range(len(L)):
if L[x] + L[y] == 0 :
print("True", L[x] , L[y])
sum(L)
@wintry pier :white_check_mark: Your eval job has completed with return code 0.
001 | True 5 -5
002 | True -5 5
@wintry pier Thanks, however I am not allowed to use loops
I know however this is a homework so I have to abide by the constraints
hhh hard things
I know I am tired as fuck
i am also shopping.. currently considering this server for my program..
https://www.google.com/shopping/product/1?q=POWEREDGE+C6220+LFF+4+NODE&client=ms-android-tmus-us-revc&biw=360&bih=667&tbs=vw:l&prmd=sivn&sxsrf=APq-WBs5qaYfMbpOs7FehoKqRcIgGOvk4A:1645895106731&prds=num:1,of:1,eto:1199145612943147352_0,prmr:1,pid:1199145612943147352,cs:1
check dm when you get a second
I am in the chat 👀
def delete_duplicate_schedule(schedules):
for i in range(len(schedules)):
for j in range(i + 1, len(schedules) - 1):
duplicate = False
if len(schedules[i]) == len(schedules[j]):
for k in range(len(schedules[i])):
if schedules[i][k].class_teaching == schedules[j][k].class_teaching:
if schedules[i][k].name == schedules[j][k].name:
if schedules[i][k].dec_times == schedules[j][k].dec_times:
if schedules[i][k].days == schedules[j][k].days:
duplicate = True
if duplicate:
schedules.remove(schedules[j])
FR?
for j in range(i+1,len(schedules))
still getting index error
Is the idea to get every pair of indices?
index changes when you remove something
no, the idea is so find dplicate schedules then delete the duplicate
output it to a set?
Ah right. Yeah what Py.noob is saying is true.
Deleting items from a list while looping over it is tricky.
You're better off constructing a new list without the items you want to remove.
agreed
the data I'm working with is huggeee
or use a while loop much better
that's gonna be really inefficent
I'm thinking of doing it recursively, everyimte I delete something, I restart and look for another duplicate starting from the beginning
but idek how to go about that
Hmm, how big?
Like a million items?
like 400
again I say, set()
Can you send the error once?
WAIIITT, could I just add the duplicate schedule to a list and after I find all the duplicate schedules, I loop over that list, and delete them from the original list
there will be no dublicate items in a set ... its a data structure just like a list however there's no indexing
this does it without having to loop over and delete at same time
schedule = list(set(schedule))
this will remove all the duplicates
!e
list = [1,2,3,3,4]
nodupes = set()
for i in list:
nodupes.add(i)
print(nodupes)
@pallid hazel :white_check_mark: Your eval job has completed with return code 0.
{1, 2, 3, 4}
can I do like schedules = schedules.set()
or would be really hard to change it to a set
this should do
py.noob, my data is like a list of lists of lists of lists
would that work?
does set still remove duplicates with this?
it'll probably end up in tuples, but yes.. would need to use enumerate i think
What does the data look like bush?
a schedule is a list of classes
and the classes have a list of professors that teach those classes
Maybe you can use a dictionary ?
{"Physics":["Mr. XYZ","Mr. ABC"]}
something like this
actually schdules is a list of schedule, and a schdule is a list of professors that a student can take
Could you please give a sample dataset ?
schedules = [ [prof_obj, prof_obj, prof_obj], [prof_obj, prof_obj, prof_obj]]
Oh right. And a prof object has these attributes? class_teaching, name, dec_times, days
Is this a custom class?
One way you can simplify the code a bit is to implement the __eq__ method for that class.
Stoicism can be epitomized by three essential beliefs: (1) that virtue is sufficient for happiness, (2) that other so-called goods should be regarded with indifference, and (3) that the world is providentially ordered by God.
That is, define what it means for two instances of that class to be equal.
uhhgg, i cant acceas my pc its doing a backup.. but its, like.. called.. listen flatten to hash a list of lists
here is a duplicate schedule
Schedule 1:
CHEM 1A:
Kyle W Taylor -> 09:00 AM - 10:30 AM -> TR
Kyle W Taylor -> 09:00 AM - 12:20 PM -> F
Kyle W Taylor -> 01:30 PM - 04:50 PM -> F
COMM 1A:
Karin Pogosian -> 10:00 AM - 11:50 AM -> MW
Karin Pogosian -> TBA - TBA -> TBA
PHYS 4C:
Eva Hoi-Lui Low -> 05:00 PM - 07:15 PM -> TR
Eva Hoi-Lui Low -> 07:30 PM - 10:20 PM -> T
Schedule 2:
CHEM 1A:
Kyle W Taylor -> 09:00 AM - 10:30 AM -> TR
Kyle W Taylor -> 09:00 AM - 12:20 PM -> F
Kyle W Taylor -> 01:30 PM - 04:50 PM -> F
COMM 1A:
Karin Pogosian -> 10:00 AM - 11:50 AM -> MW
Karin Pogosian -> TBA - TBA -> TBA
PHYS 4C:
Eva Hoi-Lui Low -> 05:00 PM - 07:15 PM -> TR
Eva Hoi-Lui Low -> 07:30 PM - 10:20 PM -> T
All prof are the same, all times are the same, and all days are the same
for which class?
For your professor class.
but that still doesn't fix the issue of deleting in a loop
E.g. ```py
def eq(self, other):
return (
self.class_teaching == other.class_teaching
and self.name == other.name
and self.dec_times == other.dec_times
and self.days == other.days
)
Yeah sorry, just a suggestion.
no this is good, I will use this
class access
!e
list = [[1,2,3,3,4],[1,2,2,4,5]]
nodupes = set()
for i in [num for sublist in list for num in sublist]:
nodupes.add(i)
print(nodupes)
@pallid hazel :white_check_mark: Your eval job has completed with return code 0.
{1, 2, 3, 4, 5}
[] <---
I tried that, gives me an error, "unhashable type: 'list':
Erm, so the thing is, there are a few ways you could approach this. The "right" way is going to depend on your experience level etc.
If you want to use a set, the objects you put in the set need to be "hashable".
Sorry, brb
gl, i am too noob with classes.. and i also need to call it a night
anyone have a website or something to study c and java from the beginning some website or yt channel that is good in explainig shit

I am giving it a shot.. will take a second @torn raven
This course will give you a full introduction into all of the core concepts in the C programming language.
Want more from Mike? He's starting a coding RPG/Bootcamp - https://simulator.dev/
⭐️ Course Contents ⭐️
⌨️ (0:00:00) Introduction
⌨️ (0:01:22) Windows Setup
⌨️ (0:05:02) Mac Setup
⌨️ (0:09:04) Hello World
⌨️ (0:12:51) Drawing a Shape
⌨️ (0...
@torn raven try this logic once
counts the number of times a schedule is in schedules
Book?
yup
it'll probably work with that too
try this first
it doesn't matter for the most part
give it a shot once
sure
@stuck furnace anything im just trying to past the test after a week and never been in class so litteraly anythig than can help
Oh, for cramming 😄
😅 yes
schedules = [[Kyle W Taylor, Karin Pogosian, Eva Hoi-Lui Low]. [Kyle W Taylor, Karin Pogosian, Eva Hoi-Lui Low]. [Kyle W Taylor, Karin Pogosian, Eva Hoi-Lui Low]]
okay gimme a second
@stuck furnace a book ?
Erm, do you have the K&R book?
nah
It's an old book, but it's still pretty good. https://en.wikipedia.org/wiki/The_C_Programming_Language
2nd edition.
@torn raven will this work ?
@unkempt magnet Also using this tool will greatly accelerate your grasp of the language: https://pythontutor.com/c.html
a book for 60$ . 60$ can buy me a lot of thing that would made me forget about the test and the degree it self
Oh
I'd have thought you'd be able to get it for cheaper than that.
Schedule 1:
CHEM 1A:
Kyle W Taylor -> 09:00 AM - 10:30 AM -> TR
Kyle W Taylor -> 09:00 AM - 12:20 PM -> F
Kyle W Taylor -> 01:30 PM - 04:50 PM -> F
COMM 1A:
Karin Pogosian -> 10:00 AM - 11:50 AM -> MW
Karin Pogosian -> TBA - TBA -> TBA
PHYS 4C:
Eva Hoi-Lui Low -> 05:00 PM - 07:15 PM -> TR
Eva Hoi-Lui Low -> 07:30 PM - 10:20 PM -> T
Schedule 2:
CHEM 1A:
Kyle W Taylor -> 09:00 AM - 10:30 AM -> TR
Kyle W Taylor -> 09:00 AM - 12:20 PM -> F
Kyle W Taylor -> 01:30 PM - 04:50 PM -> F
COMM 1A:
Karin Pogosian -> 10:00 AM - 11:50 AM -> MW
Karin Pogosian -> TBA - TBA -> TBA
PHYS 4C:
Eva Hoi-Lui Low -> 05:00 PM - 07:15 PM -> TR
Eva Hoi-Lui Low -> 07:30 PM - 10:20 PM -> T
Schedule 3:
CHEM 1A:
Kyle W Taylor -> 09:00 AM - 10:30 AM -> TR
Kyle W Taylor -> 09:00 AM - 12:20 PM -> F
Kyle W Taylor -> 01:30 PM - 04:50 PM -> F
COMM 1A:
Karin Pogosian -> 10:00 AM - 11:50 AM -> MW
Karin Pogosian -> TBA - TBA -> TBA
PHYS 4C:
Eva Hoi-Lui Low -> 05:00 PM - 07:15 PM -> TR
Eva Hoi-Lui Low -> 07:30 PM - 10:20 PM -> T
thanks its just a test if the book is not good after 5 days u will spot me asking a bout methods of cheating so plz give me an advice that dont cast 60$
Erm, @torn raven would you like me to help in one of the help channels?
Is that alright with everyone else?
Erm, would you mind going back to the beginning sorry?
Hmm, I'm a little confused by the structure of the data 🤔
Is this text file the input to your program?
Right, is this like a project for school?
test
Oh right. Can you just talk me through what the project is about briefly, so I have the necessary context to understand?
Oh right. So it's a tool for planning schedules?
And there are three schedules there. Are these just alternative options?
But the program is supposed to produce multiple schedules, right?
are you returning schedules in this function ?
Is it possible to modify the code that produces the schedules so that it doesn't produce duplicates, rather than removing the duplicates from its output?
I'll just test .. I am not sure
👍
yeah, you don't need to return
Your idea here was pretty good.
But going back to what I originally said, I would produce a new list with the duplicate elements filtered out.
As you construct the new list of schedules, check that the next schedule you append is not already in the list.
Sorry @torn raven gtg, I'll be back later please send me a message if you are still stuck.
Erm, he said he'd brb.
!e
from dataclasses import dataclass
@dataclass
class Professor:
name: str
class_time: str
days: str
def __repr__(self):
return f"{self.name}"
def __eq__(self, other):
return self.name == other.name and self.class_time == other.dec_times and self.days == other.days
def __hash__(self):
return hash(self.name) + hash(self.class_time) + hash(self.days)
@dataclass()
class Schedule:
professors: frozenset[Professor]
def __repr__(self):
return f"{self.professors}"
def __eq__(self, other):
return self.professors == other.professors
def __hash__(self):
return hash(self.professors)
if __name__ == "__main__":
prof_1 = Professor("Prof. Dr. Martin", "8:00 - 9:00", "MTW")
prof_2 = Professor("Prof. Dr. John", "9:00 - 10:00", "WTF")
prof_3 = Professor("Prof. Dr. Lucy", "10:00 - 11:00", "MWF")
schedule_1 = Schedule(frozenset([prof_1, prof_2, prof_3]))
schedule_2 = Schedule(frozenset([prof_1, prof_2]))
schedule_3 = Schedule(frozenset([prof_1, prof_3]))
schedule_4 = Schedule(frozenset([prof_2, prof_3]))
schedule_5 = Schedule(frozenset([prof_1, prof_2, prof_3]))
schedule_6 = Schedule(frozenset([prof_2, prof_1]))
schedules = [schedule_1, schedule_2, schedule_3, schedule_4, schedule_5, schedule_6]
print(len(schedules), schedules)
print(len(set(schedules)), list(set(schedules)))
@wind raptor :white_check_mark: Your eval job has completed with return code 0.
001 | 6 [frozenset({Prof. Dr. John, Prof. Dr. Martin, Prof. Dr. Lucy}), frozenset({Prof. Dr. John, Prof. Dr. Martin}), frozenset({Prof. Dr. Martin, Prof. Dr. Lucy}), frozenset({Prof. Dr. John, Prof. Dr. Lucy}), frozenset({Prof. Dr. John, Prof. Dr. Martin, Prof. Dr. Lucy}), frozenset({Prof. Dr. John, Prof. Dr. Martin})]
002 | 4 [frozenset({Prof. Dr. John, Prof. Dr. Martin, Prof. Dr. Lucy}), frozenset({Prof. Dr. John, Prof. Dr. Lucy}), frozenset({Prof. Dr. John, Prof. Dr. Martin}), frozenset({Prof. Dr. Martin, Prof. Dr. Lucy})]
Bush, if you include that __eq__ method from earlier in your class, then checking whether a schedule is already in the list is as simple as if schedule in schedules.
Ah yeah, that's how I'd do it Chris.
Although it might be a little advanced.
!stream 399633676805341194
✅ @torn raven can now stream until <t:1646019027:f>.
👀
It's going to be tricky to incorporate the ideas from Chris's code without re-writing.
My suggestion is to search sites like Reddit for free C resources. But use that tool I linked (pythontutor) to understand the language more quickly.
You can only hash objects that have an unchangeable value.
So, you can't hash a list, as you can change a list after you have created it (it's mutable).
You can hash a tuple, as it cannot be changed after creating it, but only if the elements it contains also have unchangeable values.
Although actually you can hash any object that has the __hash__ method, it is considered unsafe to do so if that object has a changeable value.
So the built in mutable types, list, set, and dict are intentionally not hashable.
Ah no 
Yeah that might be easier 👍
Chris, you there? 👀
I can hear you @torn raven
@torn raven, I have a suggestion. Are you familiar with how the in operator works?
Not in the context of for.
Like ```py
if x in xs:
...
Yeah
So it essentially loops through the list xs, and looks for an element equal to x.
Your schedules are lists, and two lists are equal if they have the same length, and all of their elements are equal.
You were talking about building up a new list of schedules a minute ago?
ye
This is what I was referring to
Erm, so you want to build a new list without duplicates. You can just add the elements one by one, but before adding an element, check whether it is already in the list.
And don't add it to the new list if it's already in there.
Yeah pretty good. Are you writing a new function to check that?
So, if you understand how the in operator works, you can do this with a very few lines of code.
Remember that I said x in xs looks for an element in xs that is equal in value to x?
Yep 🎉
@torn raven
I think you've got it 👀
Yep 😄
Well I wanted you to figure it out for yourself 😄
Which you did!
🚫🥄🍲
Erm, there is one potential caveat.
Schedules with the same elements in different orders will not be considered equal.
You should do something like sort the schedules individually.
So that two schedules with the same elements are equal.
Oh right nice.
Note that this would not work if you hadn't implemented the __eq__ method of the Professor class. Let me know if you don't understand why and would like an explaination.
👀
Can you extract two schedules which appear to be duplicates but aren't filtered?
And post them as text here?
Schedule 1:
CHEM 1A:
Kyle W Taylor -> 09:00 AM - 10:30 AM -> TR
Kyle W Taylor -> 09:00 AM - 12:20 PM -> F
Kyle W Taylor -> 01:30 PM - 04:50 PM -> F
COMM 1A:
Karin Pogosian -> 10:00 AM - 11:50 AM -> MW
Karin Pogosian -> TBA - TBA -> TBA
Schedule 2:
CHEM 1A:
Kyle W Taylor -> 09:00 AM - 10:30 AM -> TR
Kyle W Taylor -> 09:00 AM - 12:20 PM -> F
Kyle W Taylor -> 01:30 PM - 04:50 PM -> F
COMM 1A:
Karin Pogosian -> 10:00 AM - 11:50 AM -> MW
Karin Pogosian -> TBA - TBA -> TBA
Hm 🤔
Could you print them out with repr?
Like print(repr(schedule))
It prints a representation which is closer to how they are represented in code.
Erm, just somewhere after you remove the duplicates.
Because these appear identical, but probably differ in some way in their underlying representations.
Which is why it's not being filtered.
Or actually, you could add a breakpoint there and inspect the data 🤔
Alright
Oh right. Erm, you might need to output more information in your __repr__ function to really see what's going on.
Oh, that might be the issue 
!mute 922468559391698994
:incoming_envelope: :ok_hand: applied mute to @ivory crane until <t:1646025225:f> (59 minutes and 59 seconds).
What are the elements of the list?
One sec sorry...
!warn 922468559391698994 Don't post chain mail here please.
:x: The user doesn't appear to be on the server.
Ah
Sorry, was dealing with that.
Sorry, I've not been paying attention for the last few minutes.
Bit hard for me to see sorry.
Hm 🤔
Check that your input to delete_duplicate_schedule is in the format you expect.
Hmm, append(all_schedules) sounds like the culprit.
Dude trust me I find debugging as frustrating as anyone 😄
But there are a few tricks you can use to make it easier to track down bugs.
Maybe this is for future reference, but it might help to have unit tests for the functions.
That way, you don't have to go through the process of running your whole program to find a bug in one of the functions.
Can you get two of the schedule objects and try comparing them with == and see if the result is what you expect?
Alright, that might be a good idea 👍
No worries 👍
@vocal coyote <-< i've written cpython extensions using go
so u believe in hell
am i right?
👀 i believe in manmade hell yes
i made it one for myself cuz i didn't look too much CGo and just went into using it to make python extensions using it with a setup tools extension i found
then to find out that some of the functions i used call malloc behind the scenes
free memory leaks xD (execept i didn't free them...)
@somber heath what song was that?
It's from The Wiz.
"No Bad News"
😅 you just genuinely scared me with that gasp idk why
Will be back
yo m not voice verified thats why unable to unmute
@dawn epoch look at #voice-verification to see the criteria to get voice verified
ok thanks
yo whats being discussed
Currently, nothing
oh whats going on homies
Margaret Cho
whats being discussed ?
@somber heath
👀 it works
Nothing in particular.
random stuff oh
Bill Burr
whats this
my 3rd implementation of the A* pathfinding algorithm
where r u all from
it took me like 4-5 hours first time
10-20 hours 2nd time cuz i tried doing 3d and horribly failed (at optimizing not implementing)
this one was quite easy took like 20-30 mins
i'm from india 🙂
oh cool
nice & what abt others
how old r u ? r u python developer
i'm 23 and no i don't really work with python 🙂
i do like both the language and the community tho
not bad
Opal said Australia
Buura said Turkey
hey m good hru
where u from ? u python deveoper
i'm from tunisia
no, i'm just a student, but i'm very interessted in python
i want to learn more tools and yeah,
smthg like that
cool m student too how old r u
tools in which field
i'm 16 yeah i'm quite young + i don't have a specefic field, any information is good for me,
cool i gtg see u all
see ya
@woeful salmon Plays well enough when I'm not also in voice.
hi
Unless deleted.
my name is not pronounced that way btw but it's okay
guys it's so obvious you know a lot you are experts haha but i'm a super beginner, i have a very very simple question, what's the best programming library for beginners? i mean smthg to start with
The random module is fairly common.
okayy,
selenium is pretty fun because it's familiar and interactive
basically using code to control a browser
meanwhile me: hey look at that weird but cool looking thing that i totally don't know how to implement and will never use in my life.... lets go make it!
https://automatetheboringstuff.com/
@remote fox first 6 chapters will lay the groundwork, it's a free book available on the web
oh okay, thank you very much for the information
https://automatetheboringstuff.com/2e/ <- 2nd edition
it's obvious for the table of contents that it's gonna be helpful a lot
oh
there's a long way to go in haha
https://www.youtube.com/c/3blue1brown/videos @somber heath <- recommend
3Blue1Brown, by Grant Sanderson, is some combination of math and entertainment, depending on your disposition. The goal is for explanations to be driven by animations and for difficult problems to be made simple with changes in perspective.
For more information, other projects, FAQs, and inquiries see the website: https://www.3blue1brown.com
makes gr8 math videos 🙂
@somber heath sir may i demand the link, please
or at least the name of the youtube channel
❤️ Check out Lambda here and sign up for their GPU Cloud: https://lambdalabs.com/papers
📝 The paper "ADOP: Approximate Differentiable One-Pixel Point Rendering" is available here:
https://arxiv.org/abs/2110.06635
❤️ Watch these videos in early access on our Patreon page or join us here on YouTube:
LMAOOOO
Learn Deep Learning from deeplearning.ai. If you want to break into Artificial intelligence (AI), this Specialization will help you. Deep Learning is one of the most highly sought after skills in tech. We will help you become good at Deep Learning.
maybe I am a little too enthusiastic for Artificially written comics.
I do not own rights to the song in the background.
Edit:
Script was produced by Keaton Patti.
Art and lettering was made by Matt Shults
@tidal shard
LMAOOOO
@somber heath paneer
@somber heath drink some water
yoooooooooooooooo
Hi can this update your python app to latest version
opal'ned kelly'mist
🤔 its just a book for learning enough python to be able to practically use it
for updating your python version you'd need to just uninstall old one and install new one and then check for anything that might be broken to fix in your code
or if you just wanna learn features of newer versions of python then you can just google them or for 3.10 you could also watch release stream on python discord youtube channel
I have been trying that but its a huge system
was a multi statement based on recent topics, history, pride..
trying to use autoupgrade and its giving me headeache
If you're a beginner and having trouble, uninstall ALL versions of Python on your system, then do a fresh install with the version you intend on using.
what saw ?
start with python
Its a web application am upgrading from 2.7 to 3.9
@somber heath yea, move to austrailia, its a little bit away from everything
yo whats being discussed
coooooooooooool let me try this but have you ever used autoupgrade it will help move fast even in future versions
you're probably better off not relying on that moving forward, just my 2 cents
thanks will work with the 2 to 3 library
also having an issue with my server worker
is it on strike?
nope when i want to install it vs code does not recognise the self in self install install
Hello!
Trying look at bikes to buy. My company will have a cycle-to-work scheme of some sort apparently.
UK!
That's what the English channel is for. To stop us from being in Europe, and to join America!
It rains when you don't want it to rain. And vice versa of course.
brb
backups done, now to see if this windows update bricks my pc
ffs, i saw an error right before it rebooted pop up.. to fast to read it.. not a good sign
restart numba 4, hadnt realised ive been putting off so many updates
is this ur personal diary
yes, and btw.. it survived the updates.. last time, it didnt..
it was a cold, sour morning with light rain and gusting winds this late winters morn..
Back in a sec
I'm really happy that I remember all the tricks and things to do when doing audio recording.
Leave plenty of time at the beginning to set up a noise reduction profile. If you flub a line, don't stop recording. Give it a second or two gap then try again
I forgot how much I missed editing like this
"Pants? Check."
Pff
Pants are optional
Oh my god, if I say "Prease press one" one more time...
Jesus christ
👀 i say the opposite
i say Please pless one
Articulation is hard
No - MS Teams
TTS is actually pretty clean
Until manglement decides to try and put multiple languages in one prompt
That's how you pronounce it
Also - check your DMs
Scandinavia ( SKAN-di-NAY-vee-ə) is a subregion in Northern Europe, with strong historical, cultural, and linguistic ties.
In English usage, Scandinavia can refer to Denmark, Norway, and Sweden, sometimes more narrowly to the Scandinavian Peninsula, or more broadly to include Åland, the Faroe Islands, Finland, and Iceland.The broader definition ...
I have failed with my factual jokes
The Nordic countries (also known as the Nordics or Norden; lit. 'the North') are a geographical and cultural region in Northern Europe and the North Atlantic. It includes the sovereign states of Denmark, Finland, Iceland, Norway and Sweden as well as the autonomous territories of the Faroe Islands and Greenland, and the autonomous region of Ålan...
To all Fins, I apologize
so close, though!
@tiny socket We're discussing the Ukraine situation
Not sure if you wanted to be around it or not
the US can't attack canada because canada doesn't exist
If you have clock-face spectacles, can you see through time?
This article contains a list of treaties by number of parties to the treaty. A "party" to a treaty is a state or other entity that ratifies, accedes to, approves, or succeeds to the treaty.
party moment
🎉
https://en.wikipedia.org/wiki/International_Covenant_on_Civil_and_Political_Rights In article 1 of the 1966 treaty, of which Russia was a signee, it recognizes the right of all peoples to self-determination.
The International Covenant on Civil and Political Rights (ICCPR) is a multilateral treaty that commits states parties to respect the civil and political rights of individuals, including the right to life, freedom of religion, freedom of speech, freedom of assembly, electoral rights and rights to due process and a fair trial. It was adopted by Un...
Words on paper.
with complete participation
in one grand incineration
we will all go together when we go
Fa la la la la la la la la.
What's that white strip near bottom center
Kalish Knockoff
"Russian state property" -> state and property -> talking about OOP
The summary of PyDis Voice
The Morris worm or Internet worm of November 2, 1988, was one of the oldest computer worms distributed via the Internet, and the first to gain significant mainstream media attention. It also resulted in the first felony conviction in the US under the 1986 Computer Fraud and Abuse Act. It was written by a graduate student at Cornell University, R...
LP, do you speak Russian? 
@zenith radish - we like JetBrains again now?
Nah, but for people living in russia if they can get employed by a czech company it's really good for them
fine. /faɪn/ /faɪn/ a sum of money that must be paid as punishment for breaking a law or rule.
Minsc is a fictional character in the Baldur's Gate series of Dungeons & Dragons role-playing video games developed by BioWare. He originated from the pen-and-paper Dungeons & Dragons sessions held by the lead designer of Baldur's Gate, James Ohlen, and was expanded upon by the game's lead writer, Lukas Kristjanson. His video game debut was in ...
Does anyone here play D&D? I play and am a DM myself.
Someone chat with me, I need 50 msges for verification
it's working
maybe I should move the cushion as well
Why are all of the warning labels different 😂
Good!
warning labels on uk cigarettes are mad
Don’t they have pictures?
lol
Yeah
just ban it and if ppl are addicted give them nicotine patches