#voice-chat-text-1
1 messages Β· Page 108 of 1
he died in 1986
oh-
ducks are cooler
i am not soo good at pygame you can find coders better than me π
there are other libs too and if you don't want to participate its ok
i want to but i dont have skills

yes π
Lmao
Based In MA post 10 is a channel about anything and everything from North East States. My day job is lawn care, Home Demo, Residential Electrical. I make videos of unclogging culverts and drains, trains, experiments, machines, animals, trailcams, howto, aquariums, reviews, things I love and much more. I try to post weekly and off subject stuff. ...
π
let's cuddle
wow 
Strom 
yes > /dev/null &
yes > /dev/null &
woala. almost 100% load shown in prometheus
interesting π
what shall I do with it tho
play with it π
if we have @property ontop and call fullname like this```py
print(emp_1.fullname())``` would that make any errors ?
hello lucid!
@property
In this Python Object-Oriented Tutorial, we will be learning about the property decorator. The property decorator allows us to define Class methods that we can access like attributes. This allows us to implement getters, setters, and deleters. Let's get started.
Python OOP 1 - Classes and Instances - https://youtu.be/ZDa-Z5JzLYM
Python OOP 2 - ...
this video
his a good youtuber π
you can watch corey hes good
thats my point
print(emp_1.first, emp_1.email())
TypeError: 'str' object is not callable```
error
if i use it
code π
please
oh i know why there is an error
he posted
a leaked pic from there keyboard
before
its @property method
WHERE DO YOU GET THESE GIFS? 
i am on a bunch of gaming youtuber discord servers as well, and they have excellent gifs
its expensive

your neighbours? 
do you do job π
1 ver....
hmmm you can use your keyboard at world war 3 not now :\
Bye
what are you writing on is that a typewriter?
yes
here it is
may i ask why typewriter?
why not typewriter?
true
maybe its mechanical keyboard
Hi
hi guys nice to meet you
@dreamy vault hi there
π
I see the cool kids are having a meeting
now you got people here are you still sad?
Less so 
@tender sand u r a bastard
- josh
wow v bad

ur sad now
thats sad then
you can dm modmail to get the perm if joe doesn't replies
I'll give that a go π
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=1
is that linux?
yea ubuntu
oh
when dis happen?
Yesterday?
Traceback (most recent call last):
File "C:\Users\NomisS\PycharmProjects\simon's test\face detect.py", line 1, in <module>
import cv2
ModuleNotFoundError: No module named 'cv2'
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.pydis.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.
hlo
can you join the vc now?
cant speak rn sry
does anyone knows how to use socket module with port forwarding
np
A scandal erupted in 2005 regarding Sony BMG's implementation of copy protection measures on about 22 million CDs. When inserted into a computer, the CDs installed one of two pieces of software that provided a form of digital rights management (DRM) by modifying the operating system to interfere with CD copying. Neither program could easily be u...
Learn about how to find your product key to activate Windows, and when you'll use a digital license instead.
you guys seem p cool
@quaint olive wanna join?
yeah i will
Wait, could you guys make a group and invite me or smthn? It'd be really helpful if I explain my problem better
Today
Yeah, thats why.
@quaint olive I sent you a request
I meant friend request
Do you guys know about dynamic programming?
Yeah, cause this is a dp problem actually
def fsum(tsum,num,memo={}):
sm=0
if tsum==0:
return 1
if tsum<0:
return 0
for n in num:
rem= tsum-n
remr= fsum(rem,num,memo)
sm+=remr
return sm
My code became slow for larger numebers as well
Mine?
Yeah, it goes
But i'm getting an output when tsum=3 and num=[1,2]
This is the problem
why?
Hey @quaint olive!
It looks like you tried to attach file type(s) that we do not allow (.pdf). We currently allow the following file types: .gif, .jpg, .jpeg, .mov, .mp4, .mpg, .png, .mp3, .wav, .ogg, .webm, .webp, .flac, .m4a.
Feel free to ask in #community-meta if you think this is a mistake.
didnt knew that one
I mean yeah, num will be default [1,2] but here I'm taking a general case
now you are getting banned ahahaahh β€οΈβπ₯
!e
import dis
print(dis.dis('True is not None'))
print(dis.dis('not True is None'))
@random minnow :white_check_mark: Your eval job has completed with return code 0.
001 | 1 0 LOAD_CONST 0 (True)
002 | 2 LOAD_CONST 1 (None)
003 | 4 IS_OP 1
004 | 6 RETURN_VALUE
005 | None
006 | 1 0 LOAD_CONST 0 (True)
007 | 2 LOAD_CONST 1 (None)
008 | 4 IS_OP 1
009 | 6 RETURN_VALUE
010 | None
@raw wren same thing
Voice verification
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
^ read the above
there are requirements you need to meet before you can speak in vc
@random minnow it works
Okey . I am new here and also decided to learn python. I am a student of Computer science & Engineering . And really so palatinate to learn
I know the basic of C,C++,Java
What should i do for my better future ?
@raw wren
Brother. can you reply me please
i wanna know about python
Can i use java,c,c++ for project or after gaining the basic of Python ?
and what this main .py do? i know some basic of python and 2 or 3 functions
@misty sinew we hear the wind noise
can you please mute 
we're also talking to u and u ignore us :(
@raw wren your voice is so relaxing
this is makin me trip rn wtf
Sorry I had to go so abruptly Jake
HAIGH Architects is a leading multi-disciplined architecture and design firm recogised for its portfolio of award winning projects.
A collection of stacking chairs and tables in steel with epoxy coated finishes.
import torch
N, T, C, H, W = 32, 3, 3, 10, 10
x = torch.rand(N, T, C, H, W)
print("Shape of x = ", x.shape)
out = torch.zeros_like(x)
print("Shape of out = ", out.shape)
fold = 0
out[:, :-1, :fold] = x[:, 1:, :fold]
print("Out = ", out[0,0,0,:,:])
out[:, 1:, fold: 2 * fold] = x[:, :-1, fold: 2 * fold]
print("Out = ", out[0,0,0,:,:])
out[:, :, 2 * fold:] = x[:, :, 2 * fold:]
print("Out = ", out[0,0,0,:,:])
for context, this is the flag of aAmsterdam
out[:, :-1, :fold] = x[:, 1:, :fold]
@elder wraith is this you?
Long awaited hole video
Instagram: @lil_igram
Tv presenter finds himself stuck.
Original video: https://youtu.be/orYtXy1JF74
Curb your enthusiasm
Completely
here's an actual video
NEW VIDEO: Cooking with Intel 7 - Ramen Noodle Soup on a Pentium D 820 CPU
https://www.youtube.com/watch?v=yNWdB1_nGos
In this video, you'll learn how fast a CPU can get hot, how hot it can get, and how quick it'll die out without a heatsink, as I fry me a little snack on it. The CPU is an Intel Celeron 1.8GHz Willamette CPU. NO, it is NOT an A...
ππ¦
@elder wraith sorry, server folks are here to remove the old one and I'm snagging the hard drives
I now have 12 server drives: 6 HDD and 6 SSD
I didn't realize we had SSDs in there
No, I've got to do some serious data wiping on them
it wasn't a serious request
No but I did think about it
postage + cost would be far more than ordering one here
well, it would be fair
even postage would probably be more
if the SSD needs to survive the trip
although it's easier than with an HDD
@raw wren @random minnow - https://www.programiz.com/python-programming/methods/string
Really good ^
Many new-beginners loose themselves in the standard docs-
Compare:
https://www.programiz.com/python-programming/methods/string/index
https://docs.python.org/3/library/stdtypes.html#str.index
In this tutorial, we will learn about the Python index() method with the help of examples.
fair but not everyone is a beginner
I find it still helpful when understanding a lot of the quirks of these methods
https://sass-lang.com/guide @random minnow. Scroll down to "Extend/Inheritance". You should do fine without it, but it could be something to consider switching to (SCSS)
Syntactically Awesome Style Sheets
deep selector >>>
Syntactically Awesome Style Sheets
If youβre new to Raspberry PI and Hadoop and want to build a Hadoop cluster on Raspberry PI, this is definitely the place for you. Togetherβ¦
@raw wren what u doin
Oh thank god, I just managed to stop myself from diving back into Elm and ReScript
Back to Python and JS
RabbitMQ
cya
look at how shit this diagram looks
It does the job
Finally, stream is working for me
Sorry for keyboard sounds if there any, the browser version does not have very good noise suspension
hey guys were we in #voice-chat-text-0 like an hour and a half ago?
@floral current
@floral current
@elder wraith So here's a fun irritating thing. So you can add a tab to Teams for a Forms page, right? Well if you select "Open in Excel" to see the results, it opens the browser version
It doesn't even ask if you want to try to open it on the desktop app
Superior version?
teams is good
what are you guys working on
"do not cross" i agree everyday bro
@floral current question, can we do w/FastAPI a dep injection thing? Just don't wanna make it in global scope
aren't saying that in vc since there is talk going on...
yes
how
FastAPI framework, high performance, easy to learn, fast to code, ready for production
thanks
if opal was here he would have definitely made a pun
@floral current btw, if I do param: str = None with path smth like /{param}, will it recognize it as optional param?
like if we do /
if i remember yes
nice
there is a tutorial for path parameters here: https://fastapi.tiangolo.com/tutorial/path-params/
FastAPI framework, high performance, easy to learn, fast to code, ready for production
@floral current Also, I think that is the usual layout for FastAPI app, am I right?
Sorry for so much pings 
somewhat yeah
okay, nice
(You should totally follow the tutorial user guide)
@floral current from the main page? https://fastapi.tiangolo.com/
FastAPI framework, high performance, easy to learn, fast to code, ready for production
oh wait
FastAPI framework, high performance, easy to learn, fast to code, ready for production
@unique raptor I feel chased
@raven orbit no
@true valley https://docs.microsoft.com/en-us/microsoft-365/admin/add-users/remove-former-employee?view=o365-worldwide
Really, only thing a user has is email and OneDrive, everything else is βpublicβ
FastAPI framework, high performance, easy to learn, fast to code, ready for production
@app.get(
"/items/{item_id}/name",
response_model=Item,
response_model_include={"name", "description"},
)```
xfce4-terminal
how to install this
sudo apt install xfce4-terminal
wow its easy
i would thought smth like wget or curl
you almost never need to download stuff with wget
unless you're using weird software
whatttt, mostly the apps that I have used is either installable by snap or wget
and i don't use snap
snap?
;-;
I mean
what apps do you install that you need to use snap
or wget
or other non-apt stuff
none
@unique raptor shut
i use pacman
I wasn't asking you
okj
.NET
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
sudo apt-get update; \
sudo apt-get install -y apt-transport-https && \
sudo apt-get update && \
sudo apt-get install -y dotnet-sdk-5.0
can we skip stage 3?
these are commercial packages
im at 3
they are not weird though
idk apt or something
i use pacman
fair point though
Spotify and Microsoft kinda suck
c# doesn't
PyCharm is also a problem
nah
what are they talking about
well it does in Linux
it's a pain
to install
.NET Core supports cross-platform @dusty apex
well everything is pain to install on ubuntu
if I want rust, I run apt install rustc
if I want python I run apt install python3
if I want C++ on linux I run apt install g++
you can use vs code
no
just copy-paste this
boom c# installed
that causes pains later on
what pains?
like when packages.microsoft.com goes down
it will cause pain if you snap it
as it frequently has in the past
and then your apt update fails
snap is even worse
From Wikipedia: "Courts have distinguished between copyright infringement and theft."
hmm but it hasn't happened yet
whenever i run apt update it runs
just a few months ago it happened for 3 days, and a few months before that as well
Well, good for you
then you happened not to be running it when the Microsoft repos were down
Doesn't mean they weren't down
ig
"The terms piracy and theft are often associated with copyright infringement.[4][5] The original meaning of piracy is "robbery or illegal violence at sea",[6] but the term has been in use for centuries as a synonym for acts of copyright infringement.[7][8] Theft, meanwhile, emphasizes the potential commercial harm of infringement to copyright holders. However, copyright is a type of intellectual property, an area of law distinct from that which covers robbery or theft, offenses related only to tangible property. Not all copyright infringement results in commercial loss, and the U.S. Supreme Court ruled in 1985 that infringement does not easily equate with theft"
you cannot del bots
so i don't know what they will do with groovy
well i am gonna sleep its 3am here, i am gonna customize terminal tmrw
A
On September 13, 2018, excessive pressure in natural gas lines owned by Columbia Gas of Massachusetts caused a series of explosions and fires to occur in as many as 40 homes, with over 80 individual fires, in the Merrimack Valley, Massachusetts, towns of Lawrence, Andover, and North Andover. One person was killed and 30,000 were forced to evacua...
!voice @cursive ledge
Voice verification
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
sudo apt-get update;
sudo apt-get install -y apt-transport-https &&
sudo apt-get update &&
sudo apt-get install -y dotnet-sdk-5.0
hi @hollow helm
rename to HRMAs
@raw wren we're sorry, we'll stop now
print("hello world")
:/
yea i have cold
no
where is your friend potato
ooh
he won't be able to join for pyweek?
will you be there for pyweek?
ok nice
they might be homosexual
alright i will watch it currently i am coding
that IDE i was talking about
lol
no
i am thirteen
ooh
if potato drops out then we can keep him
alright
is that your friend?
i am coming wait
they're trying to help a guy without seeing what code he has
i can't
and he's not sending his updated code after attempted bug fixes
even worse is "is anyone here" and there's been a message 30 seconds agao
lol
I think living in the city would kill me.
The PIXMA iP110 is a wireless compact mobile printer that offers real convenience and superior image quality.
Delivery run, I'll probably hop on in the car (with the car audio system since I got so much shit for using my earbuds in the car before)
like for being distracted?
Figuratively or...?
Being able to hear around me
Or like air pollution π
I would likely not thrive.
Yeah, good thanks!
Trying to find every possible way to procrastinate π
@random minnow @hearty heath rate his accent 0-10
2 3
2

How's your mom? 
i just join vc
fyi, that's my kind of joke
ask: "how's your mom"
and just leave it there
purposefully delay the justification
how??
Β―_(γ)_/Β―
Β―_(γ)_/Β―
a life of cheating and fear
why would you decide to become a teacher without knowing how to read
like, i get not knowing how to read when you're a kid
but when you're an adult you can make decisions, like learning to read
@stark saddle
read the story
i'm halfway through
"All my exes live in Texas" has a ring to it.
!voice @obsidian scarab
Voice verification
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
!voice
ban appeals seem like they would be fun though
its kind of a good story reflecting upon like how is everything fucked up
i can't imagine a channel like pygen with image permslol
It's not a future possibility that can be dismissed out of hand.
you can just post link and it will pop-out as an img
no it won't
i am not gonna test it in pygen but i can show in other server
π down to 53 unread emails! π
75 was before?
mhm
just click the read-all button
that way you'll have 0
if it really matters they'll just send another
Wish I had that luxury
idioms
the worst is trying to express an idiom in another language
a b c d?
my dad can beat up your dad
Was just thinking that
meeting tiiime
The hypothesis of linguistic relativity, also known as the SapirβWhorf hypothesis , the Whorf hypothesis, or Whorfianism, is a principle suggesting that the structure of a language affects its speakers' worldview or cognition, and thus people's perceptions are relative to their spoken language.
Linguistic relativity has been understood in many d...
Where -> Tell me the location of
Who -> tell me the person that
what -> tell me the thing that
where -> tell me the place
.
Linux apps that run anywhere
https://www.harveynorman.com.au/acer-nitro-5-15-6-inch-i5-11300h-8gb-512gb-ssd-gtx1650-4gb-laptop.html cheapest gaming laptop lol
in my country
.wa s 2.3 kg to lbs
about 5.07 pounds
It's derogatory, but I personally don't see it policed
ahh its shite... get hp pavlion f15, same specs
I think it is anyways, could be wrong
In this regard, an AppImage is very similar to an
.exefile on Windows or a.dmgfile on the Mac. These files are normally prepared by the original application authors rather than by third parties. This ensures that the software works exactly the way the original application author has envisioned it to work. It also means that the application author does not have to follow arbitrary rules set by Linux distributions.
i have an acer nitro with an rtx 3060
thanks
Do you have to go to the campus or is it remote?
Fully remote
That's good at least
The city the campus is in is a hotspot
discod py library is closing
Plates into a woodchipper. As each plate is smashed into a million tiny shards, its instruction is being run. As instructions are queued up, more plates go on top of the stack. Maybe. I don't know. I'm not a computer scientist.
VCO is working on one actually
any other good python library?
But tbf Danny made a solid library given he's the sole maintainer
I'm actually surprised that was the case
He wasn't just a shoe-in?
burnout was inevitable i guess
Big projects like these usually tend to form orgs
Doesn't surprise me given how he operated
He didn't want anyone to taint his vision, which fair enough
egotistical but fair
Perhaps he just wanted to have fun with it
I'm gonna spin up some slash command apps once I find the time
@elder wraith I was getting it mixed up! You still need a bot token for stuff, not necessarily through the gateway though
https://discord.com/developers/docs/interactions/receiving-and-responding#interactions-and-bot-users
mirrorless
Most of the reviews are fairly happy with it
raid sleeper cell edition
Account compromise as a possibility.
Disillusionment. Falling out, so "fuck you all" kinda thing.
Huh
isn't Schrodinger's douchebag a meme?
It was more of a mockery, yeah
This is my favorite webcam: https://www.windowscentral.com/xbox-one-kinect-still-worth-buying-2018-lets-look-pros-and-cons
dune is like allegory for islam
I hacked mine and got body tracking to work
Grant it I didnβt write any of the code and the tool was already made. But I did have to mod my kinect
We used it to 3d scan people and object at the hackerspace in Taiwan.
harry potter would have been a good tv series
fear is the mindkiller
Hemlock: Aquarium dweller.
Cool, yeah you can do some pretty cool things with them
jk
I saw one person make a basketball hoop that moved the hoop to wherever the ball went and they used a Kinect for the ball tracking.
on youtube?
Yeah, lemme find the video
i have seen it
Oh ok
check the channel called stuff made here
android?
Yeah
i think its some option in developer options thats doing that
Does it really?
Got disconnected twice on call already so yep
hey anyone have any good study materials to get started with python
There were a few instances when I fell asleep while still on voice
Waking up hours later
Sounds like bug in your OS
Yeah MIUI optimizations are hyperagressive
Just have to bank on objects being collected once they're out of scope
But that's not really something you worry about a lot
So the profilers, are those supposed to improve performance during use, similar to a JIT?
Need me to adjust it?
bye guys
I don't think a lot of languages run profilers on the fly for optimization, but I suppose that depends how you define a profiler
Something something memory tracking/call stack costs
It's not something you'd want run in production, right?
Usually just something in your testing pipeline
But you can definitely run a profiler in prod if you're brave enough
"almost 1 in 4 Americans do not have a primary care provider" -Office of Disease Prevention
Sounds right
Depends
Most do but most prod languages are not python.
I'm helping my wife with her homework, the stats are horrific ie. "Approximately 1 in 5 Americans (children and adults under age 65) do not have medical insurance."
@property
def website_name(self) -> str:
return self.__website_name
Yep, our healthcare system is horrific
gtg folks, see y'all later
bruh
Did I do it wrong?
No, that's used somewhat often, but that isn't to say I don't strongly dislike it
I'm just copying what he had
Oh lol
Scared me, thought I'd been doing returning type hints wrong
Radiofacsimile, radiofax or HF fax is an analogue mode for transmitting monochrome images via high frequency (HF) radio waves. It was the predecessor to slow-scan television (SSTV). It was the primary method of sending photographs from remote sites (especially islands) from the 1930s to the early 1970s. It is still in limited use for transmittin...
@potent fog Check out the #voice-verification channel
That'll tell you what you need to know
The Finch Facsimile
@daring walrus Check out the #voice-verification channel. That'll tell you what you need to know
@mild flume Thanks
/
Chinese preschool really does seem to consist of sitting still. Unless given different orders, all students were required to sit in their seats with their arms at their sides, and their feet flat on a line of tape on the ground. This is not an easy task for three-year-olds.
There were two teachers in the classroom with a classic good cop/bad cop dynamic. The good cop stood in the front of the room with the desks splayed out before her. She would give simple instructions like orders to get food, water, or sometimes paint, though usually she said nothing at all. The bad cop was another teacher who prowled the classroom. Any time she saw a student remove a foot from the line, move arms from his side, or otherwise deviate from the instructions, she would yell at the student to fall back in line. Lenora spent about a week watching tiny kids get screamed at for trying to get water, shifting in their chairs, or talking to classmates.
https://slatestarcodex.com/2020/01/22/book-review-review-little-soldiers/
Critical theory (also capitalized as Critical Theory) is an approach to social philosophy that focuses on reflective assessment and critique of society and culture in order to reveal and challenge power structures. With roots in sociology and literary criticism, it argues that social problems stem more from social structures and cultural assumpt...
WIN = pygame.display.set_mode((900, 500))
ship_height, ship_width = 55, 40
img1 = pygame.image.load(os.path.join("games.pygame","Assets", "ship1.png"))
img11 = pygame.transform.rotate(pygame.transform.scale(img1, (ship_width,ship_height)), 90)
img2 = pygame.image.load(os.path.join("games.pygame","Assets", "ship2.png"))
img22 = pygame.transform.rotate(pygame.transform.scale(img2, (ship_width,ship_height)), 270)
SPEED = 5
def colors(red , yellow):
#WHITE = 255, 255, 250
#WIN.fill(WHITE)
WIN.blit(img11, (yellow.x, yellow.y))
WIN.blit(img22, (red.x, red.y))
pygame.display.update()
def controls(yellow):
keys_pressed = pygame.key.get_pressed()
if keys_pressed[pygame.K_a]: # Left
yellow.x -= 1
if keys_pressed[pygame.K_d]: # Right
yellow.x += 1
if keys_pressed[pygame.K_w]:
yellow.y -= 1
if keys_pressed[pygame.K_s]:
yellow.y += 1
def starter():
red = pygame.Rect(300, 100 , ship_width, ship_height)
yellow = pygame.Rect(700, 100 , ship_width, ship_height)
red.x += 1
clock = pygame.time.Clock()
YEP = True
while YEP:
clock.tick(60)
#red.x += 1
#yellow.y += 10
colors(red , yellow)
controls(yellow)
for event in pygame.event.get():
if event.type == pygame.QUIT:
YEP = False
pygame.quit()```
@meager laurel your channel is #off-topic-lounge-text
sry
If the editor somehow decides to accept this paper, they risk permanently destroying the credibility of this journal and its entire editorial board. As well as every author who has published in this journal or will do so in the future.
https://medscicommunications.com/2020/09/30/the-best-worst-reviewer-comments/
@runic flame
- The author should abandon the premise that his work can be considered research.
1 ^6?
!e print(1/6)
@sage shuttle :white_check_mark: Your eval job has completed with return code 0.
0.16666666666666666
!e ```py
import decimal
print(decimal.Decimal(1) /decimal.Decimal(6))
@sage shuttle :white_check_mark: Your eval job has completed with return code 0.
0.1666666666666666666666666667
!e
from fractions import Fraction
print(Fraction(1/6).limit_denominator())
@mild flume :white_check_mark: Your eval job has completed with return code 0.
1/6
A bit more decimals then with floats
how did you got 1/6
This code ^
@safe agate
!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.
@mild flume thankyou the code worked
require("dotenv").config();
const Discord = require("discord.js");
const axios = require("axios");
const prefix = "!";
let args = "";
let data = "";
function getRandomIntInclusive(min, max) {
min = Math.ceil(min);
max = Math.floor(max);
return Math.floor(Math.random() * (max - min + 1) + min);
}
const client = new Discord.Client({ intents: ["GUILDS", "GUILD_MESSAGES"] });
client.on("ready", () => {
console.log(`${client.user.tag}has logged in`);
});
client.on("message", (message) => {
console.log(`[${message.author.tag}]:${message.content}`);
if (message.content.charAt(0) === "!") {
args = message.content.substring(prefix.length).split(" ");
console.log(args);
switch (args[0]) {
case "news":
if (!args[1]) {
message.channel.send("you need to provide a category");
} else {
run = async () => {
const [a, ...b] = args;
args = "";
let search = b.reduce((res, item) => (res = res + " " + item));
console.log(search);
// switch()
axios
.get(
`https://newsapi.org/v2/everything?q=${search}&apiKey=${process.env.API}`
)
.then((res) => {
let n = res.data.articles.length;
let index = getRandomIntInclusive(0, n - 1);
console.log(index);
data = res.data.articles[index].url;
console.log(data);
message.channel.send(
`Here is the news You're looking for...${data}`
);
data = "";
})
.catch((err) => {
console.log(err);
message.channel.send("OOps! can't find a news");
});
};
run();
}
}
}
});
client.login(process.env.TOKEN);
@sage shuttle
eli@parsley:~$ ls -al ~/.ssh
total 20
drwx------ 2 eli eli 4096 May 26 11:03 .
drwxr-xr-x 38 eli eli 4096 Aug 30 21:23 ..
-rw------- 1 eli eli 484 May 26 11:03 id_ed25519
-rw-r--r-- 1 eli eli 116 May 26 11:03 id_ed25519.pub
-rw-r--r-- 1 eli eli 1326 May 26 11:08 known_hosts
eli@parsley:~$
keepassxc
!pypi dumpling
package
!pypi <package>
Can also use: pack, package
Provide information about a specific package from PyPI.
pip install Flask
pip install flask
!pypi Flask
capital F
i should put it in the terminal ?
wait
if you type pwd what does it show
np lol
beginner problems
Support the channel on Patreon: https://www.patreon.com/censiclick
Twitter: https://twitter.com/CensiClick
Music by Epidemic Sound (referral link): https://www.epidemicsound.com/referral/3308ry/
Check out more of my videos: https://www.youtube.com/censiclick/videos
https://www.python.org
https://github.com/beurtschipper/Depix
https://damip.ne...
ssh-ed25519 AAAAC3Nbadstuffwrittenherex/g1234567 example@gmail.com
@raven orbit sad we can't talk
i saw
dont know how many times people have scolded me for replying to the wrong guy in pygen
@misty sinewoi
when xithrius is c o n f u z
"halp pc is broken"
π
rip stream again
honestly
!voice
Voice verification
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
don't know what it is
I verified.
so you can speak
how do I do it
nvm sorry
you can say in channel with voice verify badge.
read the embed beautifulrequest posted
ya
you still won't be able to talk in #763406158522220544, but you'll be able to talk in #751591688538947646, #799641437645701151, #751592231726481530, and #764232549840846858
ik
π€¨
in those other channels you're no longer muted
lol np
hmm?
working on anything
yo wanna snap back to vc1
yeah let's
join #799641437645701151
but been trying to learn it and build something in PyQt5
and explain
@little hound
is it related to Qt or python
how can I use both class A and B and have all the attributes of both classes able to be used in each .
hope that makes sense
@raven orbitBeen trying to do it but thing is
with the PyQt5 layout
look's ugly asf
so let's say
I have class A
contains the first window of the user interface
but when I switch to a different window
the functions contained within class A
won't work in class B
what are you using as the layout is QMainWindow?
or is there a way out
QMainWindow is the only layout
yea so A is the centralWidget() of the layout
@raven orbitit's all good I'm just having more of a logical error then Qt error
yup
and everything contained within it
is the methods
which class is A?
@cursive rover you can use flask to interact with it https://discord.com/developers/docs/resources/application
Integrate your service with Discord β whether it's a bot or a game or whatever your wildest imagination can come up with.
@dusty apex
Video #2 in a tutorial series for building a fully functional app with PyQt5. In this video, you'll learn how to create the Login Screen for the application as well as connect the application to a database in order to validate user information.
Playlist link: https://www.youtube.com/playlist?list=PLs3IFJPw3G9LTcNjRVR6BSJwUaoj44rCV
In this vide...
you can watch this link it's pretty good thing is
I was following her layout
but
Compares Discord libraries and their support of new API features
discord.py is already outdated
for mine I had a function which I want to run after a widget is clicked in the first window
or first QMainWindow
so A is a class QWidget and it contains that QLabel, QLineEdit
ya let's say
and within it
which widget?
there's just a X.clicked.connect() function
just a Qpushbutton
yea use QtCore.Slot() to interact with it
the object name is Play but don't worry about that
ya I have those libraries imported
issue is
and I'm curious how it works with OOP
is it possible so that when I click Qpushbutton
and it switches to a different window
but the second it does that
it runs the function that I specifyed it to run.
is that function in that file where you defined the button class
@QtCore.Slot()
def on_click(self):
self.main_window: QMainWindow
self.b_class: B
self.main_window.setCentralWidget(self.b_class)
self.your_func()
so self.b_class would just allow attribute of class permission in the function.
@dusty apexI was wondering where you let
left*
why cant you speak
what do you mean by "class premission"
!voice
Voice verification
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
allowing the methods from class B to be used in method on_click
well that can be done if you pass it in the button class
but isn't making button class more complicated
like becaused Qt designer
no its not
all the objects are just from class Main
?
ok
here is how i do buttons and all QtWidgets objects
wait
you use pure python code instead of using
qt designer*
yea
fair enough what's why I had to fix mine up
it kinda sucks mid way
when you try to use the attributes of the UI file
but it'x in XML code
so you don't actually have the full widget defined as an object if that makes sense
here though
the way he did it though
was he complied the Ui file
well i havent used XML to design Qt stuff i just use normal coding
and it defines an the objects in python code
which is way better honestly
with pyuic
np
but the thing is that I'm wondering
what if you have multiple python files
i have
what's up
up?
you can check everything here
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.pydis.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.
from django.shortcuts import render, get_object_or_404
from django.http import HttpResponse, HttpResponseRedirect
from django.urls import reverse
# Create your views here.
from . models import Question
def home(request):
latest_questions = Question.objects.order_by('-pub_date')[:5]
context = {
'latest_questions': latest_questions
}
return render(request, 'polls/home.html', context )
# the context forms the bridge between the html and the objects stored in the sqlite database
# pub_date was one of the parameters for our question objects, using the order_by function will order
# the question objects by creation date.
## the text inside of http response is the text that we are passing directly to the website in http format
def detail(request, question_id):
question = get_object_or_404(Question, pk=question_id)
context = {'question': question}
return render(request,"polls/detail.html", context)
# question = Question.object.get(pk = question_id)
# this creates a variable called question_id with the goal of linking each question in our database with
# a unique question id
# the above question definition expands on this approach by allowing django to return a 404 error if the
# object being searched for doesn't exist.
def results(request, question_id):
question = get_object_or_404(Question, pk=question_id)
return render(request,"polls/results.html",{'question': question})
def vote(request, question_id):
question = get_object_or_404(Question, pk=question_id)
try:
selected_choice= question.choice_set.get(pk = request.POST['choice'])
except:
return render(request,'polls/detail.html',{'question': question, 'error_message':'please select a choice'} )
else:
selected_choice.votes+=1
selected_choice.save()
return HttpResponseRedirect(reverse('polls:results'), args=(question.id,))
# the inclusion of a try/except statement here will allow django to return an error message to the user if
# they haven't selected anything
# request.post returns a dictionary like object that allows you to access submitted data via a key name.
# in this case, request.post will return the id of the choice object created from user input, if no such
# object exists, our try/except blocks will catch the error and return an error message to the user.
# the reverse function takes two params, what your destination is (polls:results) and what we are pass
from django.urls import path
from django.conf.urls import url
from . import views
## this allows you to connect the urls file to the views file, the views file allows you
##to access templates, this command passes them to the local urls file, and the include function we typed
## in the mysite directory passes the urls from this file to the main site urls, which is where they are displayed
## from
urlpatterns = [
path('', views.home, name='home-page'),
##url(r'^$', views.home, name= "home") does the same thing as the above code
## this passes arguements to the url extension where we specified our include function
## in this case, views.home is being displayed at 127.0.0.1:8000/polls/
url(r'^(?P<question_id>[0-9]+)/$', views.detail, name="detail"),
## the ?P tells the interpreter that this is a string
## this is then set equal to the question id value
## the 0 to 9 says that its supposed to be a digit from 0 to 9 and then ends it with the plus sign
## this url links to 127.0.0.1:8000/polls/1 or whatever question number
url(r'^(?P<question_id>[0-9]+)/results$', views.results, name="results"),
## this url links to 127.0.0.1:8000/polls/1/results
## the dollar sign ends the url string, in the first example, not adding to the path before the $ redirects to the
## homepage
url(r'^(?P<question_id>[0-9]+)/vote$', views.vote, name="vote"),
## this url links to 127.0.0.1:8000/polls/1/vote
NoReverseMatch at /polls/1/vote
Reverse for 'results' with no arguments not found. 1 pattern(s) tried: ['polls/(?P<question_id>[0-9]+)/results$']
@dusty apexyou there
yea
sorry i didnt knew you dmed me
{'import': ['requests', 'json'], 'from': ['Flask'], 'as': []}
it returns this empty list
@dusty apexcan I screen share and show you



