He's not wrong. Banned, but not wrong.Now you done it
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
He's not wrong. Banned, but not wrong.Now you done it
Maybe a referral option? Run it by another seasoned user? Don't think everyone would trust a potential good deal to a random other user though, if it were indeed real.Hi Everyone,
I just wanted to have a chat about "scammers" and hear suggestions/comments on what we can do to better combat them and keep folks from getting scammed.
I have a couple ideas, I'll start a little list and add anything that sounds promising.
- Thread or Forum where people can post the types of scams they are seeing
- Voting system where if a listing gets X amount of votes it gets pulled as a scam or spam. I can't allow the entire community to have this power or it would get abused, but maybe I could make it a lifetime supporter benefit or something. (We used to have a "Good Deal!" feature where everyone could vote on listings they considered a good deal, but it got abused and was used more ironically than anything, promoting more terrible deals than good ones.) (Side thought, a terrible deal feature could work as well. We could have "Today's Worst Deal" )
Things to look out for so far:
- Do not send money to anyone unless you are 100% sure of who they are. Check feedback, check posts, etc.
Good grief: just look the hoaxes that 90%+ of the nation falls for every day.....They are similar to most ads, as they are usually copied from another ad.
Find some that way by doing Google searches, but they have learned to just change a word or two and use different pictures.
In the PMs they are quite distinctive and it simply amazes me that there are people still falling for them.
All well and good I suppose. However, why not just use your head and think it through while you still can.import mysql.connector
import re
from collections import defaultdict
# Database connection configuration
db_config = {
'host': 'localhost',
'user': 'your_username',
'password': 'your_password',
'database': 'your_database'
}
# Preprocessing function
def preprocess_text(text):
# Remove HTML tags
clean_text = re.sub('<.*?>', '', text)
# Remove special characters and convert to lowercase
clean_text = re.sub('[^\w\s]', '', clean_text).lower()
return clean_text
# Naive Bayes spam detector class
class SpamDetector:
def __init__(self):
self.prior_spam = 0
self.prior_not_spam = 0
self.word_spam_counts = defaultdict(int)
self.word_not_spam_counts = defaultdict(int)
self.vocab = set()
def train(self, conn):
cursor = conn.cursor()
# Retrieve training data from the database
cursor.execute("SELECT content, is_spam FROM forum_posts")
posts = cursor.fetchall()
total_spam = 0
total_not_spam = 0
for post in posts:
content = preprocess_text(post[0])
is_spam = post[1]
# Update counts and vocabulary
for word in content.split():
if is_spam:
self.word_spam_counts[word] += 1
total_spam += 1
else:
self.word_not_spam_counts[word] += 1
total_not_spam += 1
self.vocab.add(word)
# Calculate prior probabilities
num_posts = len(posts)
self.prior_spam = total_spam / num_posts
self.prior_not_spam = total_not_spam / num_posts
# Calculate conditional probabilities
for word in self.vocab:
self.word_spam_counts[word] = (self.word_spam_counts[word] + 1) / (total_spam + len(self.vocab))
self.word_not_spam_counts[word] = (self.word_not_spam_counts[word] + 1) / (total_not_spam + len(self.vocab))
def classify(self, text):
clean_text = preprocess_text(text)
words = clean_text.split()
spam_prob = self.prior_spam
not_spam_prob = self.prior_not_spam
for word in words:
if word in self.vocab:
spam_prob *= self.word_spam_counts[word]
not_spam_prob *= self.word_not_spam_counts[word]
# Normalize probabilities
total_prob = spam_prob + not_spam_prob
spam_prob /= total_prob
not_spam_prob /= total_prob
return spam_prob > not_spam_prob
def mark_as_spam(self, conn, post_id):
cursor = conn.cursor()
cursor.execute("UPDATE forum_posts SET is_spam = 1 WHERE id = %s", (post_id,))
conn.commit()
# Main function
def main():
# Connect to the database
conn = mysql.connector.connect(**db_config)
# Initialize and train the spam detector
detector = SpamDetector()
detector.train(conn)
# Get new forum post
new_post = input("Enter a new forum post: ")
# Classify and mark as spam if necessary
if detector.classify(new_post):
post_id = input("Enter the ID of the post to mark as spam: ")
detector.mark_as_spam(conn, post_id)
print("Post marked as spam.")
else:
print("Post is not spam.")
# Close the database connection
conn.close()
if __name__ == '__main__':
main()
Back in..He's not wrong. Banned, but not wrong.