#voice-chat-text-0
1 messages ¡ Page 32 of 1
and just what do you expect anyone to do with that information
"yes sir, we are sitting eagerly on the edges of our chairs until you do indeed require our humble assistance"
import tensorflow as tf
tensorflow.python.framework.errors_impl.NotFoundError: D:\real_Python\projects\test\lib\site-packages\tensorflow-plugins\tfdml_plugin.dll not found
What are the best projects you guys made so far
okayy so how do i divide 24 to get 4?
sorry lets try 16/4 equals 4
sorry divided by 2 which gives you 8
nvm found a way
excellent
Yo
!e
x = [1,3,54,7,1,3]
y = [3,6,2,54]
z = set(x) ^ set(y)
print(z)
@uncut meteor :white_check_mark: Your 3.11 eval job has completed with return code 0.
{1, 2, 6, 7}
It's what I'm most proud of
x = [1, 2, 3, 3, 3]
y = [2, 1, 3]
!e
x = [1,3,54,7,1,3]
y = [3,6,2,54]
z = set(x) & set(y)
print(z)
@uncut meteor :white_check_mark: Your 3.11 eval job has completed with return code 0.
{3, 54}
!d set
class set([iterable])``````py
class frozenset([iterable])```
Return a new set or frozenset object whose elements are taken from *iterable*. The elements of a set must be [hashable](https://docs.python.org/3/glossary.html#term-hashable). To represent sets of sets, the inner sets must be [`frozenset`](https://docs.python.org/3/library/stdtypes.html#frozenset "frozenset") objects. If *iterable* is not specified, a new empty set is returned.
Sets can be created by several means:
⢠Use a comma-separated list of elements within braces: `{'jack', 'sjoerd'}`
⢠Use a set comprehension: `{c for c in 'abracadabra' if c not in 'abc'}`
⢠Use the type constructor: `set()`, `set('foobar')`, `set(['a', 'b', 'foo'])`...
!e
x = [1, 2, 3, 3, 3]
y = [2, 1, 3]
print(set(x) == set(y))
@rugged root :white_check_mark: Your 3.11 eval job has completed with return code 0.
True
!e
x = [1, 2, 3, 3, 3, 4]
y = [2, 1, 3]
print(set(x) == set(y))
@uncut meteor :white_check_mark: Your 3.11 eval job has completed with return code 0.
False
oh nice discord api, dont you have to provide a key which is unique for every user?
!e
list_user1 = ["Dave", "Jermirah", "Kelli"]
list_user2 = ["Kelli", "Simon", "Jeff"]
z = set(list_user1) & set(list_user2)
print(z)
@uncut meteor :white_check_mark: Your 3.11 eval job has completed with return code 0.
{'Kelli'}
Yep, as part of that you add in your own bot token. Whole process is you make a bot, give the auto_guild script a template of what you want the guild to look like and the bot token, it then has the bot create the server, get the id's for all the categories and channels, gives you a link to invite you to the server, then transfers ownership to you
So it's meant to be a quick way to make a testing server
I was trying to make a terminal version of discord but i got scared they will ban me if i use discord api because discord dont allow third party
electric cars are evil
print(4+4)
print(4*2)
print(14-6)
print(16//2)
which all gives you 8
how come i dont get a border around my code?
!code
!code
Here's how to format Python code on Discord:
```py
print('Hello world!')
```
These are backticks, not quotes. Check this out if you can't find the backtick key.
it has a cooldown
You use the backticks like it says in the message embed
Not the code command itself
That's just to explain how to use the built in highlighting
!code
Back in a sec
!poll "So you have a CS or Engineering degree, you have a degree for which you passed some programming courses and when you are interviewing for a job you are asked to complete some tests, to check you aren't a liar. A lot of the questions look the same, discuss if this is good or bad." "Sit in silence"
The title cannot be longer than 256 characters.
!vote <title> [options...]
Can also use: poll
Build a quick voting poll with matching reactions with the provided options.
A maximum of 20 options can be provided, as Discord supports a max of 20 reactions on a single message.
GTG cy a later đ
Can someone help me fix the "name not defined problem"...its clearly defined and the program works in Pycharm but its not working in VSCode
When you get into the Python REPL (shell, whatever you want to call it), you're not loading any other files
So it's just acting as if it's a blank page to work from. To the shell, there really isn't a function named that
wut? How do i fix that
no problem
just run python nameOfFile.py
That lets you run it, but not play around with it in the repl after
the function is not defined in the repl enviorment
if you want to play around with the code then you will have to wite the code again in the repl enviorment
and then play with or you can use jupyter notebook
wait...so if i make a new project in Pycharm...write my code...bla bla..and then i open the file in VSC...it wont work?
It will
A .py file is a .py file wherever
But one editor may offer perks that others don't
I'm trying to remember, I know there's a way to do this, but my attention is split right now
im lost....lemme join the voice chat..maybe its easier to explain it by saying it and not typing it
So between where you have the path to the python.exe and the file, add -i. So it'd be like python -i file.py
!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.
This is a great place to poke around for ideas
thk
how do i get borders around my code in chat?
So for single lines, you use a single set of backticks. On US keyboards, it shares a key with the tilde ~ key, next to 1 on the number row
For larger blocks, you use three backticks
have a problem here
how about py -m venv env
Yeah, use py instead if you're on windows
Hello hemlock , hope you are well
Haha , Iâve been good
If I was rich Iâd bribe you to name your son Cleveland
Eh Iâm not rich so I was out of luck anyway
@rugged root @midnight agate why "the system" you use in office should matter when choosing a cloud provider, seems unrelated, or am i missing something
are you "HARDCORE"?
let parser = (preprocessedScannedText, symboltable) => {
let p1 = 0;
let p2 = 0;
let p3 = 0;
let p4 = 0;
let p5 = 0;
while (true) {
if (preprocessedScannedText[p1] === "if") {
//base case
if (p2 < p1) p2 = p1 + 1; //used to find (, has to be 1 symbol next to if
if (preprocessedScannedText[p2] === "(") {
if (p3 < p2) p3 = p2 + 1; //used to find )
if (preprocessedScannedText[p3] === ")") {
if (p4 < p3) p4 = p3 + 1; //used to find {, optional
if (preprocessedScannedText[p4] === "{") {
if (p5 < p4) p5 = p4 + 1; //used to find }, mandatory again
if (preprocessedScannedText[p5] === "}") {
console.log("valid if");
p1 = p5 + 1;
continue;
} else if (p5 === preprocessedScannedText.length - 1) {
console.error("error, expected '}' at line X");
} else {
p5++;
continue;
}
} else {
console.log("valid if"); //because no { is found
p1 = p3 + 1;
continue;
}
} else if (p3 === preprocessedScannedText.length - 1 && p3 !== ")") {
console.error("error, expected ')' at line X");
} else {
p3++; //increment p3
continue;
}
} else if (p2 === preprocessedScannedText.length - 1 && p2 !== "(") {
console.error("error, expected '(' at line X")
}
} else if(p1 === preprocessedScannedText.length - 1) {
break;
} else {
p1++;
continue;
}
}
}
what does this do
everything
an awful thing
Back later, IT things
parser to parse if blocks?
export function scan(source, parent, namespace) {
if (typeof source == "string")
return (
parent.appendChild(
window.document.createRange().createContextualFragment(source)
) && parent
);
if (source)
Object.entries(source).forEach(function ([key, value]) {
if (!value) return;
if (key == "#text" || value.nodeName)
return parent &&
(value = value.nodeName
? value
: window.document.createRange().createContextualFragment(value))
? parent.appendChild(value)
: value instanceof window.DocumentFragment
? value
: value[0];
if (["string", "number", "boolean"].includes(typeof value))
return parent.setAttribute(key, value.toString());
if (key == "svg") namespace = svgns;
Object.entries(
{
a: { target: "_blank" },
svg: { viewBox: "0 0 1 1", xmlns: "http://www.w3.org/2000/svg" },
}[key] || {}
).forEach(([key, attribute]) => (value[key] = value[key] || attribute));
if (!parent || !parent.appendChild) parent = undefined;
parent = [parent, ...(Array.isArray(value) ? value : [value])].reduce(
function (parent, source) {
let child = [...(namespace ? [namespace] : []), key];
try {
child = window.document["createElement" + (namespace ? "NS" : "")](
...child
);
} catch (fail) {
return parent;
}
if (!parent) return scan(source, child, namespace);
if (value) scan(source, parent.appendChild(child), namespace);
return parent;
}
);
});
return parent;
}
yes
Hi there
anyone willing to help me write this code in Python?
function getDominator(n) {
const mapa = {};
for (let val of n) {
if (mapa[val] == undefined) {
mapa[val] = 0;
}
mapa[val] += 1;
if (mapa[val] / n.length >= 0.5) {
return val;
}
}
return null;
}
const niz1 = [ 1, -2, 0, 1, -2, 1, 1, 7, -2, 1, 1, -2 ];
console.log( getDominator(niz1) );
const niz2 = [ -2, 1, -2, 7, -2, 1, -2 ];
console.log( getDominator(niz2) );
capybara - the BROdent
Flying squirrels are really cool. I do wish we had more of those. I've only seen a dozen in the wild so far this year.
I've seen far more moose.
I brake for moose. It's why I'm still alive today.
Using asynccontextmanager to create a read/write lock
what is "undefined" from JS in Python?
what about Null?
so if i wanted to see if the list is empty, how would my "if" statement look like
if (mapa[val] == undefined) {
mapa[val] = 0;
}```
Same with empty strings, dictionaries, tuples, etc
Ah, that'd be a dictionary in that case
if map[arr[i]] is None:
map[arr[i]] = 0```i
And in that case you'd do either of these:
i did something like this and its not working
ham = "pork"
spam = {}
if ham not in spam:
...
# or alternatively
if spam.get(ham) is None:
...
thanks mate
The former would be preferred in this case
function getDominator(n) {
const mapa = {};
for (let val of n) {
if (mapa[val] == undefined) {
mapa[val] = 0;
}
mapa[val] += 1;
if (mapa[val] / n.length >= 0.5) {
return val;
}
}
return null;
}
const niz1 = [ 1, -2, 0, 1, -2, 1, 1, 7, -2, 1, 1, -2 ];
console.log( getDominator(niz1) );
const niz2 = [ -2, 1, -2, 7, -2, 1, -2 ];
console.log( getDominator(niz2) );```
def dominator(arr):
map = []
for i in arr:
if map[arr[i]] not in map:
map[arr[i]] = 0
map[arr[i]] += 1
if map[arr[i]] / len(arr) >= 0.5:
return arr[i]
return None
array = [ 1, -2, 0, 1, -2, 1, 1, 7, -2, 1, 1, -2 ]
print(dominator(array))```
!e
from collections import defaultdict
def denominator(numbers):
number_dict = defaultdict(int)
for number in numbers:
number_dict[number] += 1
if (number_dict[number] / len(numbers)) >= 0.5:
return number
return None
ham = [ 1, -2, 0, 1, -2, 1, 1, 7, -2, 1, 1, -2 ]
print(denominator(ham))
@rugged root :white_check_mark: Your 3.11 eval job has completed with return code 0.
1
@golden hazel This work for you?
tensorflow.python.framework.errors_impl.NotFoundError: D:\real_Python\projects\test\lib\site-packages\tensorflow-plugins\tfdml_plugin.dll not found
print(tf.__file__)
with open(r'D:\real_Python\projects\test\lib\site-packages\tensorflow-plugins\tfdml_plugin.dll', 'rb') as f:
data = f.read(4)
print(int.from_bytes(data, "big"))
I can't talk in vc since I don't have enough messages yet
talk to you in 3 days
hahahaha
He has the time, not the messages
ah
<_io.TextIOWrapper name='D:\\real_Python\\projects\\test\\lib\\site-packages\\tensorflow-plugins\\tfdml_plugin.dll' mode='r' encoding='cp1252'>
I've been here for 4+ years 
You're like..... 5 messages away
4 now [inb4 banned for spamming]
I'm not that much of a hard ass
And you've been having genuine conversations with us
do more squats hemmy
this
"I aM dOinG mY hOmeWoRk!!!"
I wish I had python homework in hs, I was stuck using QBASIC
it wasn't actually homework, I finished all the labs in shop class [lathe, mechanical drawing, cnc] and used the computer for programming
py -c "import tensorflow as tf; print(tf.reduce_sum(tf.random.normal([1000, 1000])))"
py -m pip list
tensorflow 2.11.0
!e print(len('D:\real_Python\projects\test\lib\site-packages\tensorflow-plugins\tfdml_plugin.dll'))
@rugged root :white_check_mark: Your 3.11 eval job has completed with return code 0.
78
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
82
py -c "import tensorflow as tf; print(tf.reduce_sum(tf.random.normal([1000, 1000])))"
solution: use linux
tf.Tensor(962.38074, shape=(), dtype=float32)
py -3.9
virtualenv --python=<python_version> <path/to/new/virtualenv/>
f = open('Race_results.txt', 'r')
content = f.read()
list_break = content.split("\n")
for i in list_break:
content = i.split()
namn = content[0:2]
nummer=(content[2:])
string=" ".join(nummer)
minvärde=min(string)
maxvärde=max(string)
print(type(string))
medelvärdet=sum(string)/len(string)
print(namn[0],namn[1])
print(sorted(nummer))
print("bästa tid: ",minvärde)
print("sämsta tid:",(maxvärde))
print( )
Erik Eriksson 11.47 12.7 10.98 12.04 12.0 12.43 10.47 11.82 10.91 10.37
string = "".join(number)
Can you give the full error and traceback?
I legit forgot there was a statistics built in
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
1.5
@languid cargo Check out the #voice-verification channel
That'll tell you what you need to know about the voice gate
if there is anyone is availbe now i've simple problem in coding
What's the question?
can you join room to share my screen
same
error
how can i fixe it
another problem
f = open('Race_results.txt', 'r')
content = f.read()
list_break = content.split("\n")
for i in list_break:
content = i.split()
namn = content[0:2]
nummer=(content[2:])
minvärde=min(nummer)
maxvärde=max(nummer)
print(type(nummer))
print(namn[0],namn[1])
print(sorted(nummer))
print("bästa tid: ",minvärde)
print("sämsta tid:",(maxvärde))
print( )
here is my code for now.
here is the text sample from the text file
Erik Eriksson 11.47 12.7 10.98 12.04 12.0 12.43 10.47 11.82 10.91 10.37
Anna Andersson 10.02 11.23 13.79 12.44 12.56 11.12 12.68 10.53 13.82 10.26
here is my output
no i'dont need to rename text file
i need to rename old name of files to new name without deleting all the name of old name just the first 14 characters
namn is list, so is nummer
i don't understand
can you make it easier
by coding
so do you have some ideas to everyone how can i make code python to deleting the first 14 characters of files names
using python
what im trying to do rn is: sum(nummer)/len(nummer)
lets try
basically i dont really understand what is that but try to make simple like give some contex to copy it
Should be able to do it with pathlib..... one sec
pathlib? 
pathlib is just nicer to deal with in general
ill get back to you in 5 mins take a break
@languid cargo This is just doing changes in a given folder, right?
how ??
No no, I'm asking
aah okay no i mean like i would like to create progaram to simply deleting the first 14 chacters from the file name using python
but idk from what begin
I'm just making sure I'm understanding, sorry. Would the user give it the file they want to trim the file name of, or are they doing this on a folder of files?
đ
f = open('Race_results.txt', 'r')
content = f.read()
list_break = content.split("\n")
for i in list_break:
content = i.split()
namn = content[0:2]
nummer=list(map(float, content[2:]))
minvärde=min(nummer)
maxvärde=max(nummer)
medelvärde=sum(nummer)/len(nummer)
print(namn[0],namn[1],sorted(nummer))
print("bästa tid: ",minvärde,"sämsta tid:",maxvärde)
print("medelvärde_av_tiderna:",medelvärde)
print( )
it's simply to deleting this
can you explain to me nummer=list(map(float, content[2:])) ?
from file
You want to rename the file?
no to deleting the first 14 chacter
So you just want to store the shortened name in a variable?
@safe pumice https://www.tensorflow.org/install/pip
no inverting
wat
All files in the directory
okay i will try it and come back
Yeah, but you miss out on all the .net interfaces/tools depending on .net (not core)
I have the dumb today
@sweet lodge
Yes?
Possibly permissions error
Oh no file exists
there is problem
Ya existe
So you can either delete your file
Or.... I think you can pass a overwrite=True
Get-ChildItem | %{Rename-Item $_.Name -NewName $_.Name.Substring(14)}``` Use real scripting language

I bow to the power of PowerShell on this one
100%
Why the outer %{}?
Won't the | take care of it for you?
and no one would understand it
I guess I need glasses, can barely make out the error text anything when reading the error message... x)
Functional is awsome
I foreach stuff out of habit
I do
Why not lisp?
OH OH OH
Speaking of Excel

because not everything takes pipes, I'm also bad with Powershell and file manipulation because:
Your problem is that there already exists a file with the new (shortened) name. Open the target folder in explorer and see/delete as needed.
oh yea, Powershell would let you test it
-WhatIf?
Get-ChildItem | %{Rename-Item $_.Name -NewName $_.Name.Substring(14) -WhatIf}```
Introduction
Honestly though?
Local storage sucks
What in the name of Dog....
https://pyspread.gitlab.io/ <-- Excel, but with python!
pyspread is a non-traditional spreadsheet application that is based on and written in the programming language Python. It expects Python expressions in its grid cells, which makes a spreadsheet specific language obsolete.
Well, ignore them and take over the world? (Read: accounting dept.)
It's an accounting firm. Without them I haz no monies
@zenith radish That depends on not only the compiler, but also the kernel of whatever run-space
So yeah, gl; hf unifying that =P
I mean, can you even really call yourself a developer if you've never done a =XLOOKUP(XLOOKUP(MID(LEFT(A5,FIND(",",A5)-1),FIND("#",A5)+1,LEN(A5)),tracking[rno],tracking[reference]),tracking[reference],tracking[tracking])?
You also depend on the kernel, nt, linux, bsd, mac-whatever. It's not guaranteed to even have a stdout/stderr assigned. This also goes for Linux, for say kernel-space executables.
finally found it
@rugged root you pronouncing USB as oosb reminded me of this
https://www.youtube.com/watch?v=BHJyVXehESE
http://www.fonejacker.eu - Mr Doovde, his lack of english is confusing operators on the phone.
Anyone here tried coconut?
Simple, elegant, Pythonic functional programming.
?
@languid cargo
urg?
@languid cargo
urgent
?
hmmm
Two answers given
Three
đ˘
welp
@zenith radish What platforms are you targeting?
Oh, I see. What of those linux distros that don't have those in /lib/<sysarch>/?
Ahh, okay @faint ermine =)
@zenith radish Just trying to wrap my head around your end-goal y'see =) All fair that this is temporary/proof-of-concept.
A Readme could help ;)
is working in thoney but it didn't make any changes
stilll same
634eac7b9bdf4_
wait
@zenith radish Fair
And if you run it again?
i ve run it for 2 times
Doesn't that mean you've now lost 28 characters?
If they run it again, and it runs successfully, I'd start double-checking the paths set/given. Make triply sure (literally talking to a rubber-duck style sure), that the paths are true.
It's the same dpi as yours
@zenith radish What benefit was it you felt you got by bypassing all compiler guarantees with unsafe? Genuinely curious
no because i dindnt chane the 'example '
yeah but when i changed it simply say
đ¨
@zenith radish It's just the new() call that's unsafe, no? The rest can be typed? I'm not criticizing here, I'm genuinely curious - never understood how it could help.
Ignore the "best practices" and "error handling", I just assumed you'd do this for a concrete benefit (that I don't get, I know you need unsafe for bindgens, but that's why it's best practice to isolate them with an unsafe block, which contains only the unsafe invocation and nothing else)
1sec
@zenith radish Do you know if the nvidia modules are foss? Or just oss with closed source blobs?
got im
I think something is wrong with me. I was standing for like.... 5 minutes and now I'm light headed and my bpm is like 120
Wheeeeeeeee
is that work
find . -name "*.pdf" | xargs sha256sum | cut -d 14 (I forget the correct cut invocation, but you get the point of my guess)
you should speak to a doctor bro
My wife has been having the same issues. We also both got sick from the Epstein-Barr virus and I wonder if that's a possible lingering effect
@zenith radish Including in FF?
Many people become infected with EBV in childhood. EBV infections in children usually do not cause symptoms, or the symptoms are not distinguishable from other mild, brief childhood illnesses. People who get symptoms from EBV infection, usually teenagers or adults, get better in two to four weeks. However, some people may feel fatigued for several weeks or even months.
Well..... shit
Your claim that "nobody uses the mozilla webrtc implementation" - does that go for Firefox too? Or are you basing your "nobody uses" claim on the %pop of FF users?
This is going to be fun for an indeterminant amount of time.
Sucks man =/
The best amount of time
TTT (=> Things Take Time)
all labelled
USA are winning
Context...?
soccer
Sports update
usa vs iran
1:0 for usa
so far
whichever side loses this game is out of the championship iirc
@echo glade The latter. But maybe group them - like "for each open/draw/read", and then close the block and handle again. OR use some caching within the unsafe block
@warm jackal ty
Ooops, as you understood, wrong @
XD
@zenith radish Ref your question on which of the unsafe routes to go.
Yeah but there's so many unsafe calls
@sweet lodge thank you man it workes but idk why is working only for 1 time then i should reopenning the file location
It's not unreasonable for a library in rust to be 99% different unsafe calls. Just to achieve this.
I'd imagine an implementation wouldn't be "that bad"
I'll come back to this after I finish this example
I'll figure out the proper way to handle this
&mut a as *mut _ as *mut type
Command "mut" is not found
let val: u32 = 31;
let ptr = val as *mut usize;
dbg!(ptr);
But does it twerk
Twork?
Yeah if it's for work then it's a twork
I know this is true, because I just made it up
let val: u32 = 31;
let mut val = val as usize;
let rf = &mut val;
&mut buffer as *mut _ as *mut std::ffi::c_void;
*mut Type
a: Type
fun(&mut a);
it was fun. until next time
gotcha
@whole bear #media-processing message
My mic is suppressed
!voice
Voice verification
Canât talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
Thanks i will check it out
@toxic jacinth đ
!voice
Voice verification
Canât talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
okay
u there?
okay
u know how to use python to code?
nice
I started 3 days ago
I've only been following tutorials online
youtube
not much
just the basics
yes through the print function
yes I just learnt it today
if and elif statements
not yet
yes I will definitely learn it
I've been following this guy: programming with Mosh
on youtube
yes just following his tutorials
yes it is pretty interesting
yes python is my first programming language
pycharm
what do you use
oh ok
yeh i heard of it
the latest
version
3.11.0
oh nice
how long have you been programming for
nice
18
just finished high school
IT
how old r u?
woah that is impressive
at least you know more than me haha
oh ok
Mr. Hemlock
@pearl mica talk here
!voice
Voice verification
Canât talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
hi hajaa
hi @lethal thunder
still not allowed to talk here
Im working away
and you?
just gotta spam some text here i guess lol
more than 3 days - more than 30 mins of activity and 50 spams :p
im designing a ecommerce website on django
and you?
have you been able to seek some help from any of the helpers on this server?
im really new to python - wish i could help đŚ
this is my first project. i started it around 2 months ago
i watched some videos on YT and decided to make a website
yup
never tried anything like this before
its been fun listenin to experts on here
brb - phone call
im back
my basics are really rusty - which makes it all the more embarrassing to ask for help because im basically just copyin what another youtuber is doing. and he hasnt explained ALL of his steps which means I'm basically stuck all the time lol
i hear you
that makes sense
hello
UK
and you?
are you keepin up to date with the football world cup?
soccer
yeh - theyre thru to the next round
Eng are doing amazing. i back them to win the tournament
Hey Mo
@lethal thunder https://www.youtube.com/watch?v=rfscVS0vtbw&t=8434s
This course will give you a full introduction into all of the core concepts in python. Follow along with the videos and you'll be a python programmer in no time!
Want more from Mike? He's starting a coding RPG/Bootcamp - https://simulator.dev/
âď¸ Contents â
â¨ď¸ (0:00) Introduction
â¨ď¸ (1:45) Installing Python & PyCharm
â¨ď¸ (6:40) Setup & Hello Wor...
@prime forge talk here mo
i watched this to learn the basics
hi i have a question could u check my help thread 1 sec
do you approve?
i would be thankful
python-help
ye
no
im new to coding just my teacher wants alot
its in german
ill translate my assigment one sec
The assigment is to count the words on a specific website
We have to use Import requests and beautifulsoup4
In this Python Programming Tutorial, we will be learning how to use the Requests library. The Requests library allows us to send HTTP requests and interact with web pages. We will be learning how to grab the source code of a site, download images, POST form data to routes, read JSON responses, perform authentication, and more. Let's get started....
33
im old af
getting into programming to earn extra cash
Im a pharmacist
For a bigger car lol
vacay, homes
just financial independence generally
how old are you?
nice! you already know so much
keep it up
5
pharmacy school
hell yeh. Ive been pharmacy-ing for 13 years
i hear canada and the US are great for pharmacy. I would suggest paying attention at university and going into academic progression instead of chasing easy money in early years
So you can find well paying jobs in dead end roles. but you should go for the lower paying jobs and gain knowledge. it puts you in good standing later on in your career. i guess im doing the opposite of that when it comes to programming lol
@heavy vale you can right click their name and slide their vol up
exactly
exactly that
@echo glade i already did it
yup, the idea is to design and sell websites
thats reassuring
@heavy vale is your PC master vol too low?
ik but using python its not possible
uh oh
master volume is full
does your headset have a separate vol control?
ive learnt html and css
or even games need java
yeah
nice
you should learn it. it's apparently good for data jobs too
This Django tutorial aims to teach everyone the Python Django web development framework.
đ Course Website: https://www.dj4e.com/
đť Sample Code: https://github.com/csev/dj4e-samples/
âď¸ This course was created by Dr. Charles Severance (a.k.a. Dr. Chuck). He is a Professor at the University of Michigan School of Information, where he teaches var...
i do data science
this is what i watched
@heavy vale would you say django is useful in your line of work?
love the name btw
kinda
thanks
good bye @lethal thunder
OOOOF! good shout
@rugged root đ
Finally figured out how to make soccer watchable:
- Shrink the field.
- Shrink the goals.
- Maximum of five people per team in play at a time.
- Don't stop the game to swap out players.
- Ice instead of a field.
- Replace the ball with a small flat disc, and have the players hit it with sticks
Slug â Christ On It (Seven Grams) ft. Stalin Majesty prod. slugger
from the EP, "IGLESIA: Olde Testament"
shot by @Euphoriii in The Barrio edited by Slugga
https://soundcloud.com/slugchrist
@slug_christ
@stalinonyou
@AWFULRECORDS
@euphoriii
WeaSeL
"Life's less shitty when you see a kitty"
Life is divine when you have a feline
"Toot rooty toot. Toot rooty toot..."
will join vc later during lunch, currently trying to convince my team to actually label our docker images with human-readable version numbers
or at all, for that matter
that's ridiculously expensive
oh
aaaa
Sounds good
I used the battery in the Microsoft surface pen. The batteries lasted a grand total of 4 days per battery. And that was with me using the pen for an average of 30 minutes per day. When I purchased different batteries, 1 battery lasts about 8 months.
lord be praised
the radiator is warm
draft is closed
adoption by european commission is upcoming
@midnight agate đ
https://steve-yegge.medium.com/dear-google-cloud-your-deprecation-policy-is-killing-you-ee7525dc05dc
God dammit, I didnât want to blog again. I have so much stuff to do. Blogging takes time and energy and creativity that I could be puttingâŚ
@weary sorrel is this python 2 ,
no its just a online python compiler
oh
in looks inside the list to see whether the thing is in there somewhere or not
It's pretty awesome
its says array not defined
actually i'm a begginer
answer to array
Boys!!!
My old account was compromised!
This is a new one
this happened months ago though
You've got the perms again now
I'm a Tech Support Engineer at a company called Appsmith
Ooo, fancy
tell me what to do
Weird question. Would saying "boys and non-boys" be acceptable?
For some reason I just really like that one
"Boys and those who don't identify as boys"
I just... feel weird saying y'all
I mean I guess I use folks as well
That one feels fine
y'all is underrated
It just feels too hick, you know?
I'm from Georgia, it's part of the regular vocabulary lol
it says choice not defined
I got this killer picture with a buddy at the company, I'll share it here
Oh lawdy, theyâre really pushing the return to the office
In precisely the worst way
Yep, it was a thank you to the employees for hard work over the past 3 years
@willow light He's in the zone
I have all three
I have a hard enough time just getting all of my shit to work in one of them
I can't even imagine trying to actually maintain resources in all of them
That's absolute gold
We destroyed slack with that image lol
I thought you were wearing Crocs for a second and I was going to give you so much crap
No those are slippers from the resort lmao
My other shoes were too hot, it's summer in Thailand rn
I had furry slippers and regular shoes with me
Nice
Yep đđ
I would rather pay to youtube than twitter. Twitter blue doesn't make sense for 99% of twitter users.
With youtube, you atleast get ad free experience
@vocal basin pls explain this line
sample_answer = answer[question.index(sample_question)]
Agreed
Although I've thought about this, I don't really mind the ads. Compared to ads back in the days of regular TV, it's nowhere near as bad
I started paying for YouTube premium in 2016 because of the political ads.
Oh dear god I should have
They were sooooo bad this year
cough Ad block cough
Any more those can break basic site functionality
But think of the poor ceos living paycheck to paycheckâŚ
I'm my experience this is not the case 99.99% of the time
background play, picture in picture are pretty nice
my point is for most people, value proposition of Youtube is better than what's twitter is offering for most people
True
Probably just the business and accounting sites we have to use
You can always whitelist sites đ
And I do
everything is going above my head
Adblock is iffy on mobile, especially the app
And I'll turn it off on sites that I want to support
I didn't know they had it on mobile
and since not alot of people are paying for youtube, i don't think elon can get 50% of twitter revenue kinda money with twitter blue
Elon has simps though
My gut says it's going to be political or interest group backers
@willow light VPN
simps that are willing to pay, maybe in thousands
Are there more than one sub tier for Twitter?
I donât pirate video games though
Yarr 
I'll be back in a bit!
Later, brother
That's a cool duck!
@gentle flint did a really good job on
and 
to get you hooked!
thx
hahhahahahhaa
I've done just the right amount that I can say I've used it and am familiar with it lmao
!stream 272071537475977217
â @limpid sparrow can now stream until <t:1669829034:f>.
the p word sold you out lmao @limpid sparrow
A closure is the combination of a function bundled together (enclosed) with references to its surrounding state (the lexical environment). In other words, a closure gives you access to an outer function's scope from an inner function. In JavaScript, closures are created every time a function is created, at function creation time.
so a closure is an arrow function?
const something = () => {
console.log("hello world")
}
eh i tried
bruh so its an arrow function
so its a variable thats in the scope of one function only?
The most infamous interview question for JavaScript has got to be explaining closures. Because of this it may seem that closures are a complex topic, but in reality the idea of closures is actually pretty simple. All you need to know about closures is they they are a mechanism in JavaScript for handling variable scope. In this video I explain in...
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
hellow world
closure is like a factory, that creates functions based on parameter, maybe not general, atleast an usecase
JS Closure example
const sayHello = () => {
return `Hello ${name}`
}
sayHello() // Hello Bob
name = "Kate"
SayHello() // Hello Kate
wtf is the point of it then why not just make it one function in the first place
return `Hello ${name}`
}
sayHello("Bob") // Hello Bob
SayHello("Kate") // Hello Kate
it doesnt look like it has much uses
@midnight agate
const makeGreeter = (greeting) => {
const greeter = (person) => {
console.log(greeting + " " + person);
};
return greeter;
};
const greetHello = makeGreeter("hello");
greetHello("bob");
maybe this is a better example
looks like overengineering at its finest
haha, but, you see factory pattern quite often, this is just an example
maybe not a good one
hello can anyone please help i am in desperate need this is my ict homework ill get killed if i dont do it please help
Q.1 Write a python program to print following outputs using loops:
a) (999 -800) + ( 899 - 700 ) + ( 799 - 600 ) +....................................+ (199 â 0 )
b) # - # # # - # # # # # - # # # # # # # - # # # # # # # # #
c) x.0 // 1 - x.2 // 4 - x.4 // 16 - x.5 // 32 ..................................... - x. 10 // 1024
no
go away
ohk
detect language and print appropriately
def compose(func1, func2):
return lambda x: func1(func2(x))
this might be a good example
function composition
show me how
you make test cases for german
i show you
i dont understand bruh
what do you mean
yeah?
Samsung also has something like findmyiphone
def greeter(*, lang="english", name):
if lang == "german":
print(f"hallo {name}")
else:
print(f"hello {name}")
assert greeter(name='bob') == 'hello bob'; assert greeter(lang='german',name='bob') == 'hallo bob'
@vocal basin
findmysamsung
https://arturoherrero.com/closure-design-patterns/
@midnight agate look at this it has bunch of cool examples
from time import perf_counter
def timer(func):
def wrapper():
start = perf_counter()
func()
print(f"The function took {perf_counter() - start} seconds to run"
return wrapper
I just realized I never hit enter on this when we were talking about closures earlier
But here's a potentially useful usecase
Noah Ritter from Wilkes-Barre steals the show from Newswatch 16's Sofia Ojeda during an interview at the Wayne County Fair.
Subscribe to the WNEP YouTube Channel for exclusive content: https://www.youtube.com/wneptv?sub_confirmation=1
Download our WNEP News app: https://www.wnep.com/app
Follow WNEP on Social:
Facebook: https://www.faceb...
i found just the website for lp
is there blowmydick
there's a book about how to deal with your huge penis
ur not a weird programmer, your just weird .
here
and one for you @rugged root https://www.blowmybudget.com/products/worlds-largest-coffee-cup
â @safe pumice can now stream until <t:1669831759:f>.
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 1
002 | 2
003 | 3
004 | 4
Range(start, stop, step)
!e
for i in range(1, 11):
print(f"Mod 2 of {i} is {i % 2}")
Mind if I can get permission to voice chat?
!e
for i in range(1, 11):
print(f"Mod 2 of {i} is {i % 2}")
@rugged root :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | Mod 2 of 1 is 1
002 | Mod 2 of 2 is 0
003 | Mod 2 of 3 is 1
004 | Mod 2 of 4 is 0
005 | Mod 2 of 5 is 1
006 | Mod 2 of 6 is 0
007 | Mod 2 of 7 is 1
008 | Mod 2 of 8 is 0
009 | Mod 2 of 9 is 1
010 | Mod 2 of 10 is 0
!code
Here's how to format Python code on Discord:
```py
print('Hello world!')
```
These are backticks, not quotes. Check this out if you can't find the backtick key.
Hey @waxen barn!
You either uploaded a .txt file or entered a message that was too long. Please use our paste bin instead.
Hey @waxen barn!
You either uploaded a .txt file or entered a message that was too long. Please use our paste bin instead.
!paste
Pasting large amounts of code
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 floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.
Thereâs no final keyword in python so all caps gives devs the idea this variable is a final or non changeable
I donât want to start lol
Grepper?
https://www.codegrepper.com/ Looks neat (I'm assuming it's this one)
It is interesting
Co pilot is decent
It has sped up my coding but man Iâm realizing I donât have to think of the logic as much which I unno if thatâs a good thing
Itâs a good starter
Oh, and for anyone interested in learning JavaScript https://javascript.info/
Probably the best site I've used to learn JS
Oversleeping can cause exhaustion
Influctiation in moods
Drastic mood changes
Staying active and getting good sleep can be enough to help with depression
What would happen if you stopped taking the medication for you
Massive depression, no focus, likely wouldn't be able to force myself to go to work
I would spiral
Never been suicidal, though
Weirdly enough
Well it depends on a lot of factors
Or do you do it so the house doesnât feel empty?
@waxen barn
You might want to get noise cancelling headphones to save your ears
If it's literally just about filtering out other sounds
i've a xm4s, i got very used to anc, now it's feels just like before xm4s
They work well?
they do, obviously, i can see the difference if i have them v. not having them
i'm saying now, it feels like rest of the world got louder than before buying them
Oh sure sure
some psychology thing ig... humans are weird..
for i in range(1, 101):
if i % 2 != 0 and i % 7 != 0:
print(i)
That's entirely up to you. I try to have open discussions about mental health stuff because it's still so stigmatized in places
how you get the words blacked out>
||this||
||||
||||this||||
||get recked||
||butthole||<CLICK AT YOUR OWN PERIL
while user_input != "H"
Weeeiiiiirrrrddddddd
guys can i get some help
That's not a Chrome error is it?
what r u doin?
Sorry wasn't meaning to ignore, was writing an email.
no worries, i'm beginner so imma learn python in order to do scripts in bash
!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.
user_input = ""
while True:
print("""Welcome to the Compliment Bot
Please choose from the following options:
A To hear a joke
B To receive a compliment
X To exit the program""")
if user_input != "X" and user_input != "x":
break
if user_input == "A" and user_input == "a":
print("Whats a ghosts favorite fruit? Blueberry!")
if user_input == "B" and user_input == "b":
print("your amazing!")
else:
print("please input something intelligent.")
print("good bye!")
Embrace match case!!
yikes
From my experience it'll reserve memory until your total memory in use is around 50%. But it does a pretty decent job releasing that memory if other things demand it
i recommend https://www.systeminformer.com/nightly.php which, along with doing a lot of really neat deep process introspection, allows you to view a graph of resources used by a process
System Informer, A free, powerful, multi-purpose tool that helps you monitor system resources, debug software and detect malware.
Lil Uzi Vert - 20 Min (Lyrics)
20 Min (Lyrics) - Luv Is Rage 2 (Deluxe)
Subscribe to PicksRap for more videos: http://bit.ly/PicksRap
Luv Is Rage 2 (Deluxe), Eternal Atake, Luv Is Rage 1.5,
Lil Uzi Vert vs. the World, The Perfect Luv Tape,
Die Lit, TwoÂŽ, 444+222, Sauce It Up
Picksrap is your source for lyric videos for all the newest rap trac...
Official video for "F.N" by Lil Tjay.
Listen & Download 'True 2 Myself' by Lil Tjay out now: https://LilTjay.lnk.to/True2Myself
Amazon -Â https://LilTjay.lnk.to/True2Myself/amazon
Apple Music - https://LilTjay.lnk.to/True2Myself/applemusic
iTunes - https://LilTjay.lnk.to/True2Myself/itunes
Spotify - https://LilTjay.lnk.to/True2Myself/spotify
Y...
Stream and buy The Hunger here:
https://renmakesmusic.lnk.to/TheHunger
Join our community on discord here
Follow me on instagram/twitter/tiktok/facebook
@RenMakesMusic
Music video by Samuel Perry-Falvey and Ren
!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.
print('Hello world!')
Pasting large amounts of code
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 floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.
Original ,Username 0,omid369639 1,elyasaz09Er 2,Shmim7 3,aminghasemi_79 4,xhszgazflhgeh 5,ART1A12 6,azadianshop 7,ArminSeep 8,Setare_pumkin 9,ho3ein_ojaghi 10,Arash710R 11,mmeelloodii 12,boom_boom_1998 13,masiiiiii0 14,ka2sii 15,m_hossaini1 16,rayann56 17,Life_is_good2017 18,mohmmahd 19,sami_9520 20,haAm888 21,Vahid00560056 22,Mahdiyeh6542 23,Aylin5528mo 24,hanane_amiri6 25,pone_arami 26,hami8d 27,mohsengharooni65 28,Hamed1377 29,Saleh_sport 30,Amehran_1 31,MIC3651 32,naadi_a 33,Nitro0027 34,siamak_sh74 35,David3ia 36,Auditory_hallucination 37,mahdi_rti0300 38,Amirhh916 39,azimi07 40,Abraham6364 41,dehghani_1234 42,ladyfatimaa 43,hajmosi1234 44,Alirezaaaaa1988 45,renerota 46,OM34ID 47,Mb_asakeri 48,Ali135548turk 49,mn_mahdi
User.textUsername omid369639 elyasaz09Er Shmim7 aminghasemi_79 xhszgazflhgeh ART1A12 azadianshop ArminSeep Setare_pumkin ho3ein_ojaghi
I can't talk
Voice verification
Canât talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
!e ```py
s1 = set("abc")
s2 = set("bcd")
print(s1, s2)
diff = s1.symmetric_difference(s2)
print(diff)
@faint ermine :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | {'a', 'b', 'c'} {'b', 'd', 'c'}
002 | {'d', 'a'}
!e ```py
s1 = set("abc")
s2 = set("bcd")
print(s1, s2)
diff = s1.symmetric_difference(s2)
print(s1.difference(s2))
print(s2.difference(s1))
print(diff)
@faint ermine :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | {'b', 'c', 'a'} {'c', 'b', 'd'}
002 | {'a'}
003 | {'d'}
004 | {'a', 'd'}
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
{'d', 'a'}
(accepts two arguments) and returns the ((value of the first argument multiplied by 2) plus (4 times the second argument))
def func(a):
return a*2
!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.
!e
code
!e ```py
def func(a):
return a*2
func()
@faint ermine :x: Your 3.11 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 4, in <module>
003 | TypeError: func() missing 1 required positional argument: 'a'
code
!eval [python_version] <code, ...>
Can also use: e
Run Python code and get the results.
This command supports multiple lines of code, including code wrapped inside a formatted code block. Code can be re-evaluated by editing the original message within 10 seconds and clicking the reaction that subsequently appears.
If multiple codeblocks are in a message, all of them will be joined and evaluated, ignoring the text outside of them.
By default your code is run on Python's 3.11 beta release, to assist with testing. If you run into issues related to this Python version, you can request the bot to use Python 3.10 by specifying the python_version arg and setting it to 3.10.
We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!
@waxen barn :x: Your 3.11 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 5, in <module>
003 | TypeError: func() missing 1 required positional argument: 'a'
!E
a = 3
def func(a):
return a*2
print(a)
func()
@waxen barn :x: Your 3.11 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 7, in <module>
003 | TypeError: func() missing 1 required positional argument: 'a'
!E
a = 3
def func(a):
return a*2
print(a)
func(a)
@waxen barn :warning: Your 3.11 eval job has completed with return code 0.
[No output]
!e
def func(a):
return a*2
func(3)
@faint ermine :warning: Your 3.11 eval job has completed with return code 0.
[No output]
!e
def func(a):
return a*2
ret = func(3)
print(ret)
@faint ermine :white_check_mark: Your 3.11 eval job has completed with return code 0.
6
!print-return
!e
def func(a):
return a*2
ret = func(3)
print(ret)
ret = func(6)
print(ret)
ret = func(8)
print(ret)
@faint ermine :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 6
002 | 12
003 | 16
!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.
!e
def calculate(a, b):
return 2*a+4*b
answer = calculate(5, 6)
print(answer)
answer = calculate(8, 2)
print(answer)
@waxen barn :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 34
002 | 24
đ
Rust is so much better for this
everything is a expression
yea, still far more consistent
eh, fair, but also i want something i can actually build things with
at that point why bother?
if you're limited to js/wasm capabilities
wat?
you're still limited to web capabilities
actually, my stance might make more sense knowing i mostly do gamedev in rust
ehhh
i doubt it
but its ahead of much else for now
except for fucking docs.rs
i've been stuck on the build queue for 22h now
aight get it out
the strawman isn't gonna dissapear, but i dont really care
the one you seem to be going on against?
oh actually
theres a good tool for that
best used in moderation, as all things, but still pretty good to know the most important few
what stopped you?
you mean rustup?
or compile time?
ahhh docker
yea i recently ran into that myself
lemme share my solution
FROM rust:1.65 as rust-builder
WORKDIR /usr/src/gt_bot
# Copy cargo
COPY ./Cargo.toml .
COPY ./Cargo.lock .
# Create fake main.rs file in src and build for dependencies
RUN mkdir ./src && echo 'fn main() { println!("Dummy!"); }' >./src/main.rs
# Build dependencies first - without project
RUN cargo build --release
# Copy source files over
RUN rm -rf ./src
COPY . .
# Use SQLX offline mode to build without a DB connection.
ARG SQLX_OFFLINE=true
# The last modified attribute of main.rs needs to be updated manually,
# otherwise cargo won't rebuild it.
RUN touch -a -m ./src/main.rs
RUN cargo build --release
# Only keep binaries around for final container
FROM rust:1.65
COPY --from=rust-builder /usr/src/gt_bot/target/release/gt_bot /usr/local/bin/
WORKDIR /usr/local/bin
CMD ["gt_bot"]


