#voice-chat-text-0
1 messages Β· Page 92 of 1
google => dumb
@mild quartz Unless I'm misremembering
!e
import math
print(f'{math.pi:.44f}'[-1])
ChatGPT would have to be specifically trained on Code rather than NLP in order for it to be more specific
@lavish rover :white_check_mark: Your 3.11 eval job has completed with return code 0.
7
thats right its based on a language model
Yay I remembered a thing
@amber raptor "rABBITIsc00l6969!"
That's what I assume your password is
It's pricey isn't it?
Yeah
Well now I'm curious
Nope, itβs a shared password for something.
Magic Wall Magnetic Paint is an acrylic latex water-based paint that is mixed with iron powder that turns any wall into a magnetic receptive surface. Hang posters, papers, photoβs on walls with MAGNETS not tape or glue. This kit has all you need to create a 5β x 5β magnetic receptive wall. The ki...
Not even with enough iron mixed into it?
32oz
Yeah
That's not a lot
Oh der
You can just add magnetic primer
Because that's a thing
Never knew it was a thing
TIL
You'd have to have a lot
Iron filings
That's what they're called still
That's different than what you were describing
It's possibly treated somehow?
Oh actually... what is the flash point of powdered iron
Yeah yeah
Yeah
Per
Link it
LINK IT YOU FOOL
Yeah
For ceramic
Or that
"Cosmetic grade"
Hmm
Oh no no no
This is for makeup
Interesting
So it's likely having to go through additional safety things
ohh.. so im being pimped out to 2 teams now.. have meetings scheduled next week with their managers.. maybe i can have them fight who gets me.. with $$$ of course.
imo, thinking that ChatGPT can write programs not "programs" is a fundamental misunderstanding of what the word means (of who the programs are written for and of what's their main purpose)
almost always, programs are written firstly to express intent and are written for humans to read
and only secondly to be executed by the computer
the language may "evolve" into the state where it's auto-generated and "never" read by humans but those languages almost always have a more high-level language they're generated from
making programs "just to make it work" doesn't go far well
I'd put my foot down now. That's dumb
Benefit From Magnetite Sand Enhance Creativity When you combine magnetite sand and metal, the magnetite sand will irregularly stick to the metal. But when you consciously let the metal close to the magnetite sand, it may create a beautiful shape.Using magnetic sand and metal tools, you can create...
Sure, but either way, this wouldn't be the model to do even that
well im not doing any of their projects until somekind of agreement is come too..
about "AI replacing humans" in general
Tabnine
There's plenty of tools that assist you
I thought ChatGPT was still effectively predictive text
In very broad terms
i want to see AI start showing up in scanning software, so it can be done easily on your phone and what not.. be a big boost for 3d printing and just manufactoring in general.
Nah
I mean I'd look into these
I'd never use them
I don't have a strong enough use case
see that hemlock.. i just threw another million dollah idea out into the universe
So what do you mean, it'd scan a thing and pre-model it for you?
I'm fairly certain that's already a thing
ye i wasnt joking though....
Oh fair fair
Perhaps
@stuck furnace Sup
Hello Rabbit, LX, Py.noob
Way back in the olden days
not all parts come with a model, you can get some here and there.. but to be able to recreate anything by scanning it.. well.. awesome.. i mean anything, broken handle on something.. for the 3d printer crowd.. to scanning a part at a machine shop to replace some old ass equipment that doest have prts etc.
I do think that's already a thing. May just not be easily affordable
And if it isn't a thing, I'd be hella surprised
it kind is.. pricey for sure.. accurate.. not really.
Any solution is going to need some tweaking for the final product
!remind 30M Actually get started on migrating stuff to the annex, you dingus
Your reminder will arrive on <t:1677256503:F>!
"Hm. Almost perfect. It just needs a few twerks here and there."
"Um, sir, tweaks?"
"No, Jimmy. Get shaking."
"BRING ME THE DANCING INTERN"
"Go. To. Work."
"If I don't see gyrations within the next 10 seconds, so help me god...."
Sure
I mean
Well, we were on a budget
So...
Sloth
Unless you mean the other kind of bear
Ah yeah
Bear
Big hairy guys ye
Perfect for hugging
rawr
having a heavy rounded body build often with a marked tendency to become fat.
Yeah
No
It's part of it
Animorphs are that book series from the 90's
Oh god
That...
Hmm
Hmmm
Man that series would have been WAY weirder if furries got the powers.
Although in fairness, they would intentionally make themselves stuck in the various forms
Animorphs were kids who could turn into any animal they have previously touched
It was after your time
Yep
Way before
Yeah ya do
I mean what?
Check out my NEW VIDEOS on my OFFICIAL YOUTUBE CHANNEL here - http://www.youtube.com/gummybearintl
SHOP at http://www.GUMMYBEARSHOP.com
Subscribe to my real channel at http://www.youtube.com/gummybearintl
From the CD "I Am Your Gummy Bear".
Also from the DVD "I Am A Gummy Bear".
Available on Amazon at: http://tinyurl.com/gummybeardvd
Shirts a...
The theme song to Disneyβs Adventures of the Gummi Bears is absolutely LEGEN-BEARY. #DisneyPlusThrowbacks #DisneyPlus
For more updates, subscribe to Disney, Pixar, Marvel, Star Wars, and National Geographic.
Disney+ is the ultimate streaming destination for entertainment from Disney, Pixar, Marvel, Star Wars, and National Geographic.
Follow...
I missed what this was for
database is expected to be responsible for durability and stuff
given it's temporary, you can just store in memory
Yep
daytimebase?
memory is volatile
uwu
and it's okay for temporary data
More out of rage than enjoyment, I think
It would get very old very quickly.
you could make new sound effects for it though ....
even if you wanted to use a database you could use an in memory database
so still it gets deleted, also isnt hard at all to get setup
depends on specific requirements
if you want to separate data storage from the code, there's Redis and stuff
it's an ORM; you'd still need an RDBMS behind it
definitely not from it using an RDBMS
Hmm
@lethal island π
everything, again, depends on the specific purpose
So all these projects that tell you to use a repo as a template for a project, like how do you then mark it as a separate git repo so that you're not trying to send it back up to that one
If that makes sense
H2 would also work
not sure if i understand but i think what you want is to initlize a new git repo
git init should override
on GitHub/something itself or locally?
Github most likely since its a github feature marking as templates
I only know about Gitea which, when you create a repository, allows to chose another one as a template
@dreamy stump thats like SQL databases trying to be spread
its called sharding
TLDR; verticle scalling version of relational databases
!d discord.ext.commands.AutoShardedBot
class discord.ext.commands.AutoShardedBot(command_prefix, *, help_command=<default-help-command>, tree_cls=<class 'discord.app_commands.tree.CommandTree'>, description=None, intents, **options)```
This is similar to [`Bot`](https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#discord.ext.commands.Bot "discord.ext.commands.Bot") except that it is inherited from [`discord.AutoShardedClient`](https://discordpy.readthedocs.io/en/latest/api.html#discord.AutoShardedClient "discord.AutoShardedClient") instead.
async with x Asynchronously initialises the bot and automatically cleans.
New in version 2.0.
It is recommended to use this client only if you have surpassed at least 1000 guilds.
oh well
Here's your reminder: Actually get started on migrating stuff to the annex, you dingus
[Jump back to when you created the reminder](#voice-chat-text-0 message)
~ah forgot to remote the repo name~ dont mind that
not marking it as a template. using it as a template.
no im implying its a github feature
seemed like the issue was that a naive way to use as a template is to fork the repo
which would link back to the original, not use it as template
you can do like git init --template=mystupidbackend
ah so its not a github feature. ok im an idiot
π
with this, you will have to move the data into a separate process and somehow communicate with it
because you're already running multiple processes for the bot itself and have near-zero control over the dataflow between them
wassup amirreza
how you doin?
wut
I have no problem using autoshardedbot
AutoShardedClient uses multiple python processes to handle the interactions
Hello mustafa
what's a fun lib to learn?
pillow
so how does that restrict me?
how about a lib that works for app dev? π
i feel like that would be more useful in learning
Kivy, BeeWare are your only options i would presume
mmm
imma head out bye
it maybe fine for the most part
but if you're actually aiming towards scaling the bot, you'll eventually run into having to do IPC
if I don't use autosharded right?
and if I do it solves it for me?
why did you pick autosharded in the first place?
it sounded cool, and it said it will fix some problems for me, so why not
which problems?
that sentence implies "infrastructure to perform sharding"
so why do you need sharding?
what
idk then probably
idk if idk
so like, I'll have problems with IPC you say?
reading further into this, I think, you won't have too much problems with autosharding
but if you don't have to do sharding, you probably shouldn't
if I continue using autoshard
you can leave it as is
ok then
cus I've written the whole bot in it, and still haven't faced any issues cause of that
and idk what will change if I change it to just bot
maybe I'll have to rewrite something
I guess locally at first
it won't gain or lose anything for now
but when you try to gain performance (in the >1000 guilds case), you'll have to do IPC regardless of whether you use this type of sharding or not
ok
it all depends on how complex and how frequently used the bot's going to be
idk what IPC is
I mean I know the definition
but idk how it affects my way of coding
interprocess communication (in any form)
examples:
connecting to the database or any other service over the socket
pipes
System V IPC (or whatever it's called)
signals
hm
ok
well I guess by the time I reach 1000 guilds I will know what to do with IPC
how do you deploy the bot?
oh what
Docker
I don't use Docker
at least I believe I don't
or you mean like where I host it?
do you launch it on the cloud or locally/self-host?
uhm, I'm not sure what that is. My dad has like a "server", idk how to call it, and it's like a VM with ubuntu, that's where I host it
if you don't depend much on the debugger in your development process, you'll probably benefit from using Docker (especially if you work with DBs)
although it does take some time to get used to
debugging is a little bit harder to do with docker, but still possible
the current version that is hosted there is a complete mess, it even uses the old 1.7.3 discord.py
1.7.3 is near being dead because of intents or something
ye
that's why I'm rewriting the bot
and almost finished
it works, but I still think of implementing some commands into it
I haven't rewritten all of them
I am not sure of reaction-role thing, I think of making it, but I used database for it, and now I want to use discord's buttons, and idk if they need db
I think they don't
And like I need to make it to last longer than bot lifetime
hey guys im writing a dmenu clone that is for windows and uses the win32 api.
it will be part of my wwm.ahk(windows window manager) autohotkey script, currently it has the functionallity to switch desktops,add them, and delete them.
im trying to make a mix of autohotkey/python.
cool
there is an existing implementation that is written in c++
what did you store in the DB?
am i allowed to post github links?
yup
embed isn't necessary tho
there you go this is a dmenu implementation that is for windows and its written c++
I have a bot for reaction roles; it stores the ids of messages it'd sent
roles themselves are hard-coded because I built it for one specific server
and do buttons need a DB to last longer than program lifetime?
buttons themselves can't store all this data; so you'd probably need the same table but with reaction column replaced with button column or something
you can attempt to infer most of it though
but like buttons are in a View, and I thought I could make like a dict[button->role], and then use bot.add_view I believe so that it lasts longer than lifetime
I guess I gotta try it and see
you can infer all the data perfectly from the button press except for what role to give
VoIP phones might be my new nemesis
unless you use exact names of roles
how do you get the video role?
@ionic lake They'll be able to help way more than us
I typically grant it on a temporary basis as needed.
oh, ok
James is staff so that's a bit different
Wait
Nevermind, formerly is
But has my trust. I'll grant a probationary then permanent role as I get to know someone and they've shown to be responsible
(not to say y'all aren't trust worthy, just that I don't know you much, you know what I mean)
Yo
how are you...whatsup
@formal ember it's demons right? That's how I assumed it worked
Jarvis!! from iron man
!lovely
planning to make one
have heard it takes time ~7months arnd
this is a preview of my creation (i forked the code from another guy it only did a few things) .
this program doesnt need to be compiled. just edit the source,reload the ahk, and enjoy the new functionality.
well seems like nobody doesnt care. π
I can't just write everything in rust π¦
Means I can actually understand what you're doing for once π
temped to use Zig
AI ? i literally no idea. π
I haven't got around to learning Rust.
do it
So are you working on the parsing right now?
yep
converting expressions to De Bruijn index
In mathematical logic, the De Bruijn index is a tool invented by the Dutch mathematician Nicolaas Govert de Bruijn for representing terms of lambda calculus without naming the bound variables. Terms written using these indices are invariant with respect to Ξ±-conversion, so the check for Ξ±-equivalence is the same as that for syntactic equality. E...
This means I can eliminate alpha reductions
and just focus on beta, eta and delta reductions
Ah got to go get dinner ready, back later π
@rugged root can you please give the streaming privelege? i wanna stream some coding, (what i actually want to stream is 'programming' dmenu for windows that is written in python)
also could use powertoys
but this is also nice
Why was the programming in quotes there?
Howdy yall
I've heard people have been liking it
@lavish rover I believe you will find that YOU are the hot wort
Why was programming in quotes? I'm confused what you're meaning
??
sorry what
isnt wort a liquid?
ah mustafa you play the hogwart game?
FOCC "Fear of Camel Case" / seems like a nice term
but thats one thing ive been loving about this propeitary software.. camlesnakecamletoe.. snakecamelsnake-eggs
whats camle?
Back later
lets gooo
but i can switch between them.hmm ..
Yo
He's doing a phd in reciting Newton's laws now
my brain cells while coding
sir Hemmy.. how are your requests library skills?
who needs requests when you make functions instead?
im trying to save time fixing snmp passwords by logging into a devices webgui..as id have to try all the old stored passwords for each division which is like 50 each.. thats gonna be a lot of code.
so far i can login fine, but the endpoint i need to goto is some generated mumbo jumbo and looking up now how to get all the info require to create it dynamically togo that url.. why cant things just be easy
eh.. the docs might make easy.. silly me.
too much popcorn
Hi i need Help with library camelot.py
Python Enhancement Proposals (PEPs)
CCCCC
kernel_size=3
c = utils.get_hubert_content(hmodel, wav_16k_tensor=wav16k, kernel_size=3)
curl -X POST "http://10.0.204.11/asset-loaded" -d '{"AssetsLoaded": 1, "PlaceId": 1}' -H "Content-Type: application/json"
<!doctype html>
<html lang=en>
<title>400 Bad Request</title>
<h1>Bad Request</h1>
<p>The browser (or proxy) sent a request that this server could not understand.</p>
curl: (6) Could not resolve host: 1,
curl: (3) URL using bad/illegal format or missing URL
curl: (3) unmatched close brace/bracket in URL position 2:
1}'
^
cant speak
Voice verification
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
@low rain π
VirusTotal
HackThisSite.org is a free, safe and legal training ground for hackers to test and expand their ethical hacking skills with challenges, CTFs, and more.
my gd internet
does anyone knows about einops
library in python
@somber heath have you heard about einops library in python
I've not.
Though I do know it reads sponie when read back-to-front.
I'm slightly disappointed the library in question isn't called Ynoops.
lol ππ
@gleaming daggerπ
100 days of code?
@trim patioπ
They say that time will tell.
What I would like to know is what it's telling and to whom.
I don't have permission for mic π
time is relative
Voice verification
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
Time is a relative? Huh. A vague surprise. It's always those closest to you that hurt you the most.
Except when it isn't.
Just green tea π
Hello my guys!
@proud gullπ
whats good this weekend huh?
Yes
I am eating a chocolate and working with flask once again
yes
and you?
nice. I am not so advanced, learning it right now.
@glad crow can I ask you something about my code? Is pretty short, I dont know why there's an error.
Thank you!
Not Found
The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
I have no idea why this occurs until a second ago it worked. This is the code:
# importing libraries
from flask import Flask, render_template, request
from flask_mail import Mail, Message
app = Flask(__name__)
mail = Mail(app) # instantiate the mail class
# configuration of mail
app.config['MAIL_SERVER']='smtp.gmail.com'
app.config['MAIL_PORT'] = 465
app.config['MAIL_USERNAME'] = 'email@gmail.com'
app.config['MAIL_PASSWORD'] = 'blabla'
app.config['MAIL_USE_TLS'] = False
app.config['MAIL_USE_SSL'] = True
mail = Mail(app)
# message object mapped to a particular URL β/β
@app.route("/contact")
def index():
return render_template('contact.html')
@app.route('/send_message', methods=['GET', "POST"])
def send_message():
if request.method == "POST":
email = request.form['email']
nume=request.form['nume']
subiect = request.form['subiect']
mesaj = request.form['mesaj']
message = Message(subiect, sender='email@gmail.com', recipients=[email])
message.body = 'Email: ' + email + "<br>" + "Nume: " + nume + "<br>"+"<br>"+mesaj
mail.send(message)
success = "Feedback trimis!"
return render_template("result.html", success=success)
if __name__ == '__main__':
app.run(debug = True)
Hello shaken, Opal, AF
Ima be honest with you this code sucks
Whats the point of a sync email sending
what URL do you test/open?
this is Flask
don't question sync
It is a tutorial from 8 months ago
theres a port of TLS and a port os SSL
then should i try something else? like elasticemail?
the port from TLS is 587
ssl is 465
but this completely wrong thought you were reading mail for a sec
Gmail SMTP server address: smtp.gmail.com
Gmail SMTP name: Your full name
Gmail SMTP username: Your full Gmail address (e.g. you@gmail.com)
Gmail SMTP password: The password that you use to log in to Gmail
Gmail SMTP port (TLS): 587
Gmail SMTP port (SSL): 465
also one thing
i hope you arent using your google password
because that doesnt work
haha sorry I just dont care about them that much
you have to generate a password from google
why tf are SSL and TLS referred as different things
isn't it STARTTLS not just TLS?
@proud gull are you using your google password?
yea
no you cant use that
TLS is the modern name for SSL.
damn now I got what you said.
and then you put the application name
and then it gives you a one time password
you can never access it again, but thats the only way to log into google from their API
they removed that like a few months ago
this is not the same as TCP vs UDP in any way.
it has like four octets of four charecters each if i remember correctly
so a 16L password from google or maybe 12
bc TLS is built on top of SSL , so its different
based on, not built on top of.
isnt it a successor to SSL? so then its built on top of it? ye then based on
"A built on B" != "A built on top of B"
TCP isn't a better UDP.
TCP is undeniably worse as underlying transport protocol to build VPNs on top of.
some applications require less checks
in particular, "require less checks", not just "require checks less"
Can you send a direct link to that page? I have my google account in another language and I just cant find it
Also can it be a business google account too?
sending emails from a bussiness account ?
to a bussiness account
yeah sure why not but it will most likely be considered spam
Wassup bazinga
checked, it's STARTTLS indeed
(handshake happening at the different point in the session)
but i mean just use TLS 1.2
its more secure - although i heard TLS 2 also is comming or something?
Oh thats the reason why. it says that the setting I am looking for it's not available for my account
this doesn't sound like something related to mail at all
- its TLS 1.3 that comes with HTTP/3
SMTPS ("SMTP over SSL") now probably uses TLS 1.2/1.3 anyway
the protocol is was deprecated for reasons other than SSL/TLS security
i have barely seen anyone use HTTP/3
HTTP/1.x 6.7%
HTTP/2 65.4%
HTTP/3 27.9%
Honestly didn't expect this at all
Ex. Discord uses H2 not H3
@edgy cargoπ
Hi
@tulip mango π
how's it going
Hey
Fine
@alpine moonπ
no..it seems I cant manage to get a one time password
it's an API key rather than a password, iirc
one setting to allow it and another one to get it
So should I enable the gmail api?
the only time I ever sent something from python via gmail, was with the API key
I'll be back a bit later.
Hello
I have an exercise at school and I can't do that
Can u help me
Given a positive integer N. Calculate the sum of all proper divisors of N (the proper divisors of N are the divisors that are smaller than N).
Please
I really need that π₯Ί
You may wish to investigate the behaviour of the modulo operator, % as it applies to things numerical.
It allows you to determine the remainder of a division operation.
is very quiet π
playing minesweeper
(losing)
Nah I am done i am trying to create a contact form for my site and it is really hard.
It seems that sending the data from an html form to my email is very hard to do
why do you need mail for contact form?
till now I was using just html then i used flask
thats the request. the site needs a contact form.
Did you see my above message?
basically to send emails
hi @somber heath
automating the emails is hard. thats the part where i am stuck
I dont know how to do it or in which way
iseven has valid reasons to exist
"valid"
modulus doesn't do necessary all checks
because it's float
is inf even? is NaN even?
those checks
the problem is that if i want to send the email using php I need a domain, I am pretty sure
imo, for both those cases it should throw an error
same for number exceeding int limits for JS
for some reason, my understanding of "contact form" is that the user sends some info to the website and isn't expected to receive anything automatically
"thanks for feedback" email may be just replaced by "thanks for feedback" page
reverse DNS thingy
IP to domain
for example, if your IP-to-domain entry doesn't match, gmail won't accept to receive the email
no what
it's not marked as spam
it's just rejected in full
when did you send it?
that's a lot of time ago
they only recently added
less than two years ago
The IP address sending this message does not
have a 550-5.7.25 PTR record setup, or the corresponding forward DNS entry
does not 550-5.7.25 point to the sending IP. As a policy, Gmail does not
accept messages 550-5.7.25 from IPs with missing PTR records.
(sorry for broken formatting)
I'm imagining a scenario where you've got this computer sitting in some basement of some office building plugged into the internet by someone set to just send out these spam emails, but then the person who sets it up dies and it just keeps going sending out all these spam e-mails to addresses it finds.
S7, yes.
and the people keep sending money to this account that just gradually gets bigger and bigger
50 years down the track, the feds eventually find the computer and the account and are like...
"Hm...Why is this computer sending out scam emails? It's not even sending the money anywhere..."
any free hosting website?
depends on what you host, on the scale, other things
paid services may provide free plans/trials
although they kind of want you to pay them
oh hell I remembered some awful thing
smtp.js
bad
https://www.000webhost.com/ is this one okay?
Absolutely free web hosting with cPanel, PHP & MySQL for a stunning blogging start. Get free website hosting together with a free domain name at no cost at all!
* remembered, not recommended
I'd never recommend that thing
iframes still happen
my brain works like T9 or something
<iframe> not even deprecated
<frame> is
<keygen>
This mechanism is designed for use with Web-based certificate management systems. It is expected that the <keygen> element will be used in an HTML form along with other information needed to construct a certificate request, and that the result of the process will be a signed certificate.
so to generate .csr or something
.
I think I've since seen the video in question. The "extra head" is a foreleg.
<?php
// Retrieve form data
$name = $_POST['nume'];
$email = $_POST['email'];
$subject = $_POST['subiect']
$message = $_POST['mesaj'];
// Create email message
$to = 'andreilioantudor@gmail.com';
$body = "Name: $name\nEmail: $email\nMessage: $message";
$headers = "From: $email";
// Send email
if (mail($to, $subject, $body, $headers)) {
echo 'Thank you for your message!';
} else {
echo 'Sorry, there was an error sending your message.';
}
?>
this is my php code and this is the error I get:
Parse error: syntax error, unexpected '$message' (T_VARIABLE) in /storage/ssd4/409/20361409/public_html/index.php on line 468
dont use mail()
hey I am downloading a project from Vaadin but it is not having the main class
what should I do
This is Java if anyone has knowledge
is there a link?
$subject
to the website???
what project are you downloading?
also you leaked yoyr email? @proud gull
it's like a web app
Does the html have to be before the php?
is it public? if yes, then where do you download it from?
i have to download the main framework then work on it
which of these two?
@sour willow they get it from my html form
first, I'd assume
Or doesnt it?
yeah
but when you open the website thr form hasnt submitted anything
ahhh i hate typing on mobile
did you download the repository or this thing?
can u send me the link of the current page
so what should I do? right now I just tried it once again and it says Notice: Undefined index: nume in /storage/ssd4/409/20361409/public_html/index.php on line 465
Notice: Undefined index: email in /storage/ssd4/409/20361409/public_html/index.php on line 466
Notice: Undefined index: subiect in /storage/ssd4/409/20361409/public_html/index.php on line 467
Notice: Undefined index: mesaj in /storage/ssd4/409/20361409/public_html/index.php on line 468
Thank you for your message!
But i think it is because I didnt get to type anything in my form so the variables didnt get assigned any strings
this is kind of a ready project, seems like
i was here
unlike the vaadin/flow repo which probably is a library not an executable
use isset to check
also for gods sake dont use mail()
it sucks - use phpmailer or a better alternitive
how it should work is that like Spring Boot but better
ye i know but , im saying the mail() sucks
using php mailer is just adding phpmailer to compositor
it seems to be an extension of Spring Boot
and changing some variables
https://github.com/PHPMailer/PHPMailer @proud gull
ye it makes Spring Boot better
So @lucid blade I should still use post right?
Many PHP developers need to send email from their code. The only PHP function that supports this directly is mail(). However, it does not provide any assistance for making use of popular features such as encryption, authentication, HTML messages, and attachments.
Formatting email correctly is surprisingly difficult. There are myriad overlapping (and conflicting) standards, requiring tight adherence to horribly complicated formatting and encoding rules β the vast majority of code that you'll find online that uses the mail() function directly is just plain wrong, if not unsafe!
The PHP mail() function usually sends via a local mail server, typically fronted by a sendmail binary on Linux, BSD, and macOS platforms, however, Windows usually doesn't include a local mail server; PHPMailer's integrated SMTP client allows email sending on all platforms without needing a local mail server. Be aware though, that the mail() function should be avoided when possible; it's both faster and safer to use SMTP to localhost.
Please don't be tempted to do it yourself β if you don't use PHPMailer, there are many other excellent libraries that you should look at before rolling your own. Try SwiftMailer , Laminas/Mail, ZetaComponents, etc.
ofc
if you use GET its very easy to change the data
; reboot;
this was for me
$name = isset($_POST['nume']) ? $_POST['nume'] : '';
$email = isset($_POST['email']) ? $_POST['email'] : '';
$subject = isset($_POST['subiect']) ? $_POST['subiect'] : '';
$message = isset($_POST['mesaj']) ? $_POST['mesaj'] : '';
is this better?
let me just give you my own code
lol π
so you get a feel of how to do it properly
if (isset($_POST['first-name']) && !empty($_POST['first-name'])) {
$upFirst = $_POST['first-name'];
$upLast = $_POST['last-name'];
....
}
oh i am so stupid. Thank you @hoary olive and I am sure I am going to understand sometime
each email would also have to have the "shut up don't message me" link
and you'd have to store the blacklist database
also so people dont exploit your mailer and you become used as part of a botnet / spam campaign
if you can do more issets, and !empty() then do it, to fully be sure the data has been provided
also preferable wrap the code in this sanatize()
this just removes some nasty inputs that you might not need
updated code:
public function sanatize(string $var): string
{
$var = htmlspecialchars($var);
$var = trim($var);
$var = filter_var($var, FILTER_SANITIZE_FULL_SPECIAL_CHARS);
$var = str_replace(' ', '', $var);
$var = addslashes($var);
$var = stripslashes($var);
return $var;
}
^^ this works way better use this one
for contact form I'd suggest just putting input users give you in some data storage instead of mailing it anywhere
and for "thanks for contacting us" message, just redirect to a page saying it instead of replying with an email
or is "using email" in the requirements?
so then how i would do it is
^
$first_name = $loadFromUser->sanatize($upFirst);
$last_name = $loadFromUser->sanatize($upLast);
$email_mobile = $loadFromUser->sanatize($upEmailMobile);
$password = $loadFromUser->sanatize($upPassword);
``` sanatize is just in a class so you have to define $loadFromUser your self ,
add to db build mailing list
// Retrieve form data
if (isset($_POST['nume']) && !empty($_POST['nume'])
&& isset($_POST['email']) && !empty($_POST['email'])
&& isset($_POST['subiect']) && !empty($_POST['subiect'])
&& isset($_POST['mesaj']) && !empty($_POST['mesaj'])) {
$name = $_POST['nume'];
$email = $_POST['email'];
$subject = $_POST['subiect'];
$message = $_POST['mesaj'];
}
is this okay?
async/await?
Good to know I think
"yeild" wtf
yes and then use the sanatize method on all those fields
!e
import keyword
print(keyword.kwlist)
print(keyword.softkwlist)
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | ['False', 'None', 'True', 'and', 'as', 'assert', 'async', 'await', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'nonlocal', 'not', 'or', 'pass', 'raise', 'return', 'try', 'while', 'with', 'yield']
002 | ['_', 'case', 'match']
also pro tip for your emails have your inputs like this
<input type="text" name="email-mobile" id="up-email" autocomplete="email"value="<?= (isset($_POST['email-mobile'])) ? $_POST['email-mobile'] : ''; ?>">
8080 i used to do php years ago, i left it though this is very old code
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
35
also add $_SERVER['REQUEST_METHOD'] === 'POST' to the top of that if statement
Yes but it is the main ones no ?
there are typos.
i learned php as my first language, and i will never regret that, i feel like its just an awesome language. its that hard, and i got to learn coding fundementals from it. But now i do java(spring boot). I never used Python for webdevelopment so can't say anything there
you already got me stuck
after my last message I read all you sent and I didnt understand almost anything
no try-raise-except-finally
@verbal laurelπ
ok let me fix the code so you understand
π
also, None, False, True, yield
and extra added: false, true, yeild
but can you use email, subject, name and message?
ok
"safe method to shoot yourself in the foot"
@lunar geodeπ
Sup, bot
I need to learn the fundamentals I think
@hoary olive i really appreciate the fact that you are helping me, even though i think I am a lost case
I use for APIs not for templates
I am bender. Please insert girder.
Sorryπ«‘
<?php
function sanatize(string $var): string
{
$var = htmlspecialchars($var);
$var = trim($var);
$var = filter_var($var, FILTER_SANITIZE_FULL_SPECIAL_CHARS);
$var = str_replace(' ', '', $var);
$var = addslashes($var);
$var = stripslashes($var);
return $var;
}
if (
$_SERVER['REQUEST_METHOD'] === 'POST'
&& isset($_POST['nume']) && !empty($_POST['nume'])
&& isset($_POST['email']) && !empty($_POST['email'])
&& isset($_POST['subiect']) && !empty($_POST['subiect'])
&& isset($_POST['mesaj']) && !empty($_POST['mesaj']))
{
// Retrieve form data
$name = sanatize($_POST['nume']);
$email = sanatize($_POST['email']);
$subject = sanatize($_POST['subiect']);
$message = sanatize($_POST['mesaj']);
// Create email message
$to = 'andreilioantudor@gmail.com';
$body = "Name: $name\nEmail: $email\nMessage: $message";
$headers = "From: $email";
// Send email
if (mail($to, $subject, $body, $headers)) {
echo 'Thank you for your message!';
} else {
echo 'Sorry, there was an error sending your message.';
}
}
?>
still you should use PHPMailer
tidy
Wow perfect I understood everything except the sanatize function what does it?
for templates, imo, right now JS is top1 and PHP is top2 in terms of what they've been made for
This is what I try to learn
you heard about this course ?
JS also works quite well for APIs
@hoary olive wow really appreciate it should I try it? Omg I am so excited. I'll try it and I will let u know. So now it should really send the email, shouldn't it?
Ho ok
Ok the sanatize function
=>
htmlspecialchars => imagine i have a <h1> in my code, if you send this email to a user, the HTML will have this paresed <h1> within it meaning the text will get bigger so we use htmlspecialchars to remove this a render <h1> as <h1>
trim => removes white spaces :
filter_var => this is a PHP function which basically just fully sanatizes it you also can have other params, its white compliced
str_replace => doing what trim() was doing so you can remove it
addslashesh => if you have it's it will make itit\'s because it can escape a string
stripslashesh => does the exact opposite of addlashesh()
just b/c u cant tell the quality of the course
so because i was doing something weird back then i would basically repeat some functions and do the exact opposite of some functions (dont ask why)
so then you can remove some of these
coursera has a multitude of free open university level courses
from some of the best universities
$_SERVER['REQUEST_METHOD'] === 'POST' => checks if its a post request so the user cant make a request to that
isset($_POST['nume']) && !empty($_POST['nume']) checks if a value exists
sanatize() just removes this useless clutter from the string that can latter on create issues
https://github.com/PHPMailer/PHPMailer
^^ PHPMailer is amazing at explaning what it does and how it works, just check that out, and put the password that i taught you how to generate instead of the password field
I did not get the email using mail
i saw this course on bitcoin on coursera and it was basically this woman reading plain boring text
tldr; i learnt nothing lol
check spambox?
also mail doesnt work on a local env , thats why i say dont use it
the engineering ones are usually quite good
The PHP mail() function usually sends via a local mail server, typically fronted by a sendmail binary on Linux, BSD, and macOS platforms, however, Windows usually doesn't include a local mail server; PHPMailer's integrated SMTP client allows email sending on all platforms without needing a local mail server. Be aware though, that the mail() function should be avoided when possible; it's both faster and safer to use SMTP to localhost.
I got it in promotions but something happened: it removed all of the spaces from the message
so it is likeamessagewithoutspaces
ye because i sanatized it remove trim() and str_replace() should fix it
i used to have a social network, so i did this lol
You used Adobe CF or programmed in CF?
If it was typed, wouldn't they just be washing their hands?
How can I do so instead of printing message sent successsfully I render a thank you page?
Validates email addresses automatically
Protects against header injection attacks
Error messages in over 50 languages!
DKIM and S/MIME signing support
Compatible with PHP 5.5 and later, including PHP 8.2
Namespaced to prevent name clashes
```cool phpmailer feature
header("Location: profile.php/");
werid why out of any language you picked php to send emails but OK
Nodemailer is a module for Node.js to send emails
because I couldn't send them with python
(I might have missed the answer, but I still don't understand why use mail at all)
what if it is an html page? i have this error: Warning: Cannot modify header information - headers already sent by (output started at /storage/ssd4/409/20361409/public_html/index.php:1) in /storage/ssd4/409/20361409/public_html/index.php on line 495
whats on line 495? (post 10 lines atleast)
// Create email message
$to = 'andreilioantudor@gmail.com';
$body = "Name: $name\nEmail: $email\nMessage: $message";
$headers = "From: $email";
// Send email
if (mail($to, $subject, $body, $headers)) {
header("Location: result.html/");
} else {
echo 'Sorry, there was an error sending your message.';
}
}
?>
its what you have sent
header('Location: result.html');
exit;
what would be the difference?
this exists, you can also use die, same exact thing
okay got it
nah I dont want it to die
php docs were awesome , because you could see other peoples codes aswell, such a cool unique feature
it says that i cant modify the headers at all I think it is due to my hosting
in a lot of cases, examples are the preferred way of documenting in general
Nextcloud
thats pretty much the only way you can do that in PHP
@sand coralπ
hello
$URL="http://yourwebsite.com/";
echo "<script type='text/javascript'>document.location.href='{$URL}';</script>";
echo '<META HTTP-EQUIV="refresh" content="0;URL=' . $URL . '">';
I think i can do it like this
I programmed in go once
I rewrote a python script and got around 100~1000x speed increase
Hello Guys!
Can u share ur interview experience >
why do you sound like Hamza? @lucid blade
!e functions
@cunning lake :x: Your 3.11 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | NameError: name 'functions' is not defined
import did most of overhead
you can change output_buffering @proud gull not sure if it work but you can try
!d function
A series of statements which returns some value to a caller. It can also be passed zero or more arguments which may be used in the execution of the body. See also parameter, method, and the Function definitions section.
yes but still same thing isnt it ?
also I now compile and use the thing on two separate images
how will i put my local file URL="/result.html" right?
go is nice, but i dont think it has the best language design IMO
its datetime templates are such a meme
<meta http-equiv="refresh" content="2;url=redirect.html">
I think I managed to do it
Malbolge, the best one: neither readable nor writeable
Man Go's concurrency is on another level
BF is easy to write but not to read
@lucid blade are you Hamza?
from what I've heard, Malbolge has no known way of implementing anything in it other than brute force
Do you know you sound very much like him?
But then their package system is like a namespace, its not really a package. dont get the point of it tbf
also i feel like Testing => Global. testing => private is stupid
you used applets before?
what is ur job @lucid blade ? in which tech u work?
@hoary olive thank you so much for everything I got to go for now ! I appreciate you too @lucid blade Have a good day guys!
what isn't lol
let's go, lowest minesweeper winrate in around a week
im interested to see what algo you wanna come up with
certified
twice.
especially because you arent willing to see other peoples math
there have apparently been some breakthroughs in the minesweeper algorithms recently
it has algo behind it, Harvard and some other uni's have papers on how it works
35% on advanced win rate i think from minesweeper.online or smth?
one of my difficulty records got nerfed (win probability turned out to be greater) and they (minesweeper.online) compensated me
40%
on expert
ye but its not that good
how usual aimbots work is they use network requests to get player location
so wall bang them
but you will prob get banned from it
having a level 1 account on a random game, having 99% accurecy is not normal lol
thats impressive
Hello MagicalGirl
how i can speak in this chanel
!voice
Voice verification
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
!voice
Fortnite for some reason doesn't never bans across ip addreses - so like on an alt if you use cheats theres no issue (or atleast wasnt)
yes
I've only been approached once for help on a project of that sort
although only for the more legitimate part which is something like DRM (implementing not circumventing)
there are quite often multiple people behind one IP
"You can run DOOM on ChatGPT."
"for research purposes"
is so interesing
Given the way ISPs operate, banning IP addresses is not always a reasonable response to unwanted activity. ISPs will multiplex/NAT multiple users behind one IP address. In the event an IP ban is necessary, it's best applied temporarily.
idk
@grim steppe π
Belarus still has death penalty
(iirc)
some evidence points in the other direction (I won't search for source now):
people commit worse crimes if threatened by death penalty
(more to gain by getting rid of witnesses, for example)
@somber heath
meanwhile <where I live, the country>: promotes domestic crimes on the state level
many do don't they?
i recall a prison that still does lethal injection, and death penalty
Vietnam is one of the countries, which still apply the death penalty. The death penalty is applied to many types of crimes and in practice every year, a lot of death sentences are declared and executed.
only country in Europe
(although I live in one of those lucky cities who try to move in the opposite direction)
Phu Quoc Prison: HELL on the island paradise of Vietnam
there are many different algebras
initially it was meant to clone hem though....
@glad crow did you say the bytes in the zip file? https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT
time to rename
yoo!!!!nice
this notice didn't go away yet
@molten pewter theres this cool ass vanillaos "Vanilla OS 22.10: An Arch and Fedora-compatible Ubuntu"
so you get soo many packages with this very cool
Drivers are hella expensive seen from ~200-1500$ ones
Open source projects pride themselves on the wisdom and effort of the crowd, but in the case of webcam drivers, one man has done what many could not. A lone French programmer by the name of Michel Xhaard is single handedly responsible for making 235 USB webcams available to Linux users. It seems remarkable in [β¦]
@whole bear π
hi
Michel Xhaard
nothing
Archive: help.zip
warning [help.zip]: 12 extra bytes at beginning or within zipfile
(attempting to process anyway)
error [help.zip]: start of central directory not found;
zipfile corrupt.
(please check that you have transferred or created the zipfile in the
appropriate BINARY mode and that you have compiled UnZip properly)
any ideas?
os.system(f"unzip {package}.zip {package}/")
os.system(f"cd {package} && chmod +x setup.sh && ./setup.sh")```
where did you get zip file from?
@somber heath
os.system is expected to redirect all of stdout, stderr and stdin, iirc
does it work before sending it to the web server?
just like subprocess commands by default
!d zipfile
Source code: Lib/zipfile.py
The ZIP file format is a common archive and compression standard. This module provides tools to create, read, write, append, and list a ZIP file. Any advanced use of this module will require an understanding of the format, as defined in PKZIP Application Note.
This module does not currently handle multi-disk ZIP files. It can handle ZIP files that use the ZIP64 extensions (that is ZIP files that are more than 4 GiB in size). It supports decryption of encrypted files in ZIP archives, but it currently cannot create an encrypted file. Decryption is extremely slow as it is implemented in native Python rather than C.
The module defines the following items:
isn't unzip by itself already a vulnerability?
there are worse things than zipbombs that it can carry
!e lists
@cunning lake :x: Your 3.11 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | NameError: name 'lists' is not defined. Did you mean: 'list'?
!d list
class list([iterable])```
Lists may be constructed in several ways:
β’ Using a pair of square brackets to denote the empty list: `[]`
β’ Using square brackets, separating items with commas: `[a]`, `[a, b, c]`
β’ Using a list comprehension: `[x for x in iterable]`
β’ Using the type constructor: `list()` or `list(iterable)`...
this?
!d help
help()``````py
help(request)```
Invoke the built-in help system. (This function is intended for interactive use.) If no argument is given, the interactive help system starts on the interpreter console. If the argument is a string, then the string is looked up as the name of a module, function, class, method, keyword, or documentation topic, and a help page is printed on the console. If the argument is any other kind of object, a help page on the object is generated.
Note that if a slash(/) appears in the parameter list of a function when invoking [`help()`](https://docs.python.org/3/library/functions.html#help "help"), it means that the parameters prior to the slash are positional-only. For more info, see [the FAQ entry on positional-only parameters](https://docs.python.org/3/faq/programming.html#faq-positional-only-arguments).
This function is added to the built-in namespace by the [`site`](https://docs.python.org/3/library/site.html#module-site "site: Module responsible for site-specific configuration.") module.
!e print ("Hello World")
@cunning lake :white_check_mark: Your 3.11 eval job has completed with return code 0.
Hello World
I think the issue is that a streaming zip will default to Zip64 format but that unzip 6 or later is needed to read Zip64. The manual says -fz- can be used if the input is known to be smaller than 4 GB to prevent the use of Zip64, but that isn't clearly documented anywhere else in that manual.
Forcing the <4GB zip binary format, as in the zip manual and hinted at in the "(please check that you..." part of the warning from unzip [see below], basically works with the extra output of the zip step:
So checked some stackoverlfows posts, all of them talk about a <4G issue. i Honestly have no clue why that should be an error, but thought i mention it
in particular:
zip can include .. that can overwrite files outside the current directory
some implementations don't mitigate that
@glad crow
iOS or something had that vulnerability with less-than-good consequences
@cunning lake :x: Your 3.11 eval job has completed with return code 1.
001 | File "<string>", line 1
002 | list {'chocolate', 'Hemlock', 'Bazinga', 'Sheldon'}
003 | ^
004 | SyntaxError: invalid syntax
!e
l = ["chocolate", "Hemlock", "Bazinga", "Sheldon"]
print(list(map(lambda v: v, l)))
@hoary olive :warning: Your 3.11 eval job has completed with return code 0.
[No output]
I have to gooo
bk
!e list The_Big_Bang_Theory = ["Sheldon", "Peny", "Leonard", "award", "Rajes", "brenedet"] print ("The_Big_Bang_Theory")
@cunning lake :x: Your 3.11 eval job has completed with return code 1.
001 | File "<string>", line 1
002 | list The_Big_Bang_Theory = ["Sheldon", "Peny", "Leonard", "award", "Rajes", "brenedet"] print ("The_Big_Bang_Theory")
003 | ^^^^^^^^^^^^^^^^^^^
004 | SyntaxError: invalid syntax
"f os.path in particular"
ho
its in memory, so it will print the mem address not the actual value
!e
the_big_bang_theory: list[str] = ["Sheldon", "Peny", "Leonard", "award", "Rajes", "brenedet"]
print(the_big_bang_theory)
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
['Sheldon', 'Peny', 'Leonard', 'award', 'Rajes', 'brenedet']
hoooooo ok
SyntaxError: invalid syntax
list before name
also, everything on one line
?
this is type hint
this is not type conversion/cast
!e
the_big_bang_theory: list[str] = ["Sheldon", "Peny", "Leonard", "award", "Rajes", "brenedet"]
print([bang for bang in the_big_bang_theory])
@glad crow :white_check_mark: Your 3.11 eval job has completed with return code 0.
['Sheldon', 'Peny', 'Leonard', 'award', 'Rajes', 'brenedet']
what do you mean by primitives?
string the_bbc[4] = {"Sheldon", "Peny", "Leonard", "Award"};
std::cout << the_bbc << std::endl;
0x___
!e
class C: ...
print(C())
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
<__main__.C object at 0x7f05624f0050>
the address: 0x7f05624f0050
object[] is a pointer, so it's printed as an address
!e
the_big_bang_theory = ["Sheldon", "Peny", "Leonard", "award", "Rajes", "brenedet"]
print(the_big_bang_theory)
@hoary olive :white_check_mark: Your 3.11 eval job has completed with return code 0.
['Sheldon', 'Peny', 'Leonard', 'award', 'Rajes', 'brenedet']
Java does the same, it prints a mem address
is there tostring or something like in C# (.ToString())?
idk how well C# converts the arrays
C# should be like Java tbf
int[] nums = { 1,2,3,4,5 };
Console.WriteLine(nums.ToString());
System.Int32[]
so i presume by default its gonna be a memory addr aswell
not even an address
even in .NET 7
@cunning lake :x: Your 3.11 eval job has completed with return code 1.
001 | File "<string>", line 2
002 | print(the_big_bang_theory) print(a < B)
003 | ^^^^^
004 | SyntaxError: invalid syntax
yes
and this outputs Program+C
using System;
public class Program
{
class C {
}
public static void Main()
{
Console.WriteLine((new C()).ToString());
}
}
@cunning lake :x: Your 3.11 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | NameError: name 'a' is not defined
@cunning lake
to not clutter this channel too much, you can use #bot-commands
Imma head out and procrastinate π see you guys later π
and, like, for actual questions/demonstration, you can type here
or link to messages in there
https://www.reddit.com/r/youtube/comments/11ahl85/what_the_fuck_i_cant_even_take_shorts_off_my_home/
@molten pewter
autoplay thing -- same for music services
and choice of music is paywalled
also, putting the brave browser thing to the site may be seen as an endorsement
and that may influence website's reputation
theres a deeper scam going on, on spotify rn
94 votes and 58 comments so far on Reddit
@fallow dagger π
ππ
@warped relic π
hello
@rugged falcon π
bbl going to youtube for a bit
@coarse turret yellow
hi can u hear me?
yee
do you have a mic good sir/madaam
you dont havbe to talk and them type lol
yeah but new account so i cant use the mic
huh
a bit im not an expert
you have to type in the chat for awhile to then talk
its a bit wonky
thats pretty much what it is here
web scrapping ?
and you where inspecting while logging in
whats this video you where watching
I've been waiting 10min for the "Download" Button to appear Please help....
Here we go through how to use requests to POST the login information and session to make it persistent, allowing us to scrape information behind a login wall.
Dummy site: https://the-internet.herokuapp.com/login
Patreon: https://www.patreon.com/johnwatsonrooney
Proxies: https://iproyal.club/JWR50
Hos...
@coarse turret
I have no idea
im trying to download python
to learn it
but
i cant even download it
dont download it from microsoft store
ive tried via web
but
when i tryna open a shell in cmd
it redirects me to the microsoft store page
since i didnt got it from here
i know but i can create a shell without making a shell in cmd
I think i downloaded it from the Python page
not from microsoft store
i've terminated, updated and resetted the Microsoft store
Its a bugg in Microsoft store issue
i know
but
the whole store isnt working
look
okay
lemme RE-download from websitre
I just downloaded this one
i tried inspecting while logging into spotify and theres nothing lol
"That page?" this is https://www.python.org/downloads/release/python-31010/
righttt?????????
Thanks β€οΈ
done
i think you can do that with google manager
you can check their safety
joined at the end of the convo with no context lol
ye why not
Hello there @somber heath
currently messing around learning FreeCd
freecad
would be cool to get into 3d printing but im just scared like to have it in my room making toxic plastic fumes
unless they have made a "Safe" one
but nothing is truly safe
it seems that ABS is bad but PLA seems fine
yeah
@whole bear π
can't speak
Voice verification
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
i need to send only 50 messages lol
@sleek widget π
