Skip to content
Sign UpLog In
Profile icon

Crow

@Hillo232
Repls
Community
Hillo232
Hillo232
published an Update
3 months ago
0
Dev Bot v2
Dev Bot v2A Dev Bot I'm making to post and get answers for code. Not perfected, started this project around a year ago and I'm recontinuing it once more. Please leave any suggestions you have. :)
Dev Bot V2
Dev Bot questions.py overview First few lines are just imports to import all libraries needed to make this cog. Line 6, db=pickledb.load("answers.db",False) is to load the database that holds all the answers to the question. The command getanswer is used to get a key similar the what the user searched. The library difflib. The function getclose_matches is used to match strings and try to get a close match the the string provided. In this case, the user input(the question) is matched to a key in answers.db. Note: The string variable is the key in this code and not the question. The next command, add_answer allows a user to match a question with an answer. Currently, this code doesn't allow you to add answers to a specific key that has already been created, thus not allowing you to add multiple answers to the same key. The rest of the code is fairly self explainable. You set the question to the answer and then dump it back into the .db file. The check function is used to ensure the message recorded as the response is written by the same user in the same channel. The bot awaits the next message sent by the user and registers it as the answer. COMMON ISSUES If you duplicate the key, it will either error or it will overwrite the existing answer. If the .db file is empty, it will error with a byte reading error. COMMON QUESTIONS Q: What is the python.py cog? A: I will be making another post on that soon. A quick summary would be something like the cog jishaku which gives bot developers some generic info used when developing their bot aka a debugging cog. Q: Why do you split the string variable only to join it back together? A: If you look at the .db file, you will see the complete chaos of sorting the string. Splitting allows me to separate each individual word and join it back into one string to match/send the question/response. This is the end of the post, comment any suggestions/questions.
#python
#discordbot
#devbot
Hillo232
Hillo232
published a Repl
3 months ago
0
Dev Bot v2
Dev Bot v2A Dev Bot I'm making to post and get answers for code. Not perfected, started this project around a year ago and I'm recontinuing it once more. Please leave any suggestions you have. :)
Hillo232
Hillo232
Dev Bot questions.py overview First few lines are just imports to import all libraries needed to make this cog. Line 6, `db=pickledb.load("answers.db",False)` is to load the database that holds all the answers to the question. The command `get_answer` is used to get a key similar the what the user searched. The library `difflib`. The function `get_close_matches` is used to match strings and try to get a close match the the string provided. In this case, the user input(the question) is matched to a key in `answers.db`. Note: The string variable is the key in this code and not the question. The next command, `add_answer` allows a user to match a question with an answer. Currently, this code doesn't allow you to add answers to a specific key that has already been created, thus not allowing you to add multiple answers to the same key. The rest of the code is fairly self explainable. You set the question to the answer and then dump it back into the .db file. The check function is used to ensure the message recorded as the response is written by the same user in the same channel. The bot awaits the next message sent by the user and registers it as the answer. **COMMON ISSUES** If you duplicate the key, it will either error or it will overwrite the existing answer. If the .db file is empty, it will error with a byte reading error. **COMMON QUESTIONS** Q: What is the python.py cog? A: I will be making another post on that soon. A quick summary would be something like the cog `jishaku` which gives bot developers some generic info used when developing their bot aka a debugging cog. Q: Why do you split the string variable only to join it back together? A: If you look at the .db file, you will see the complete chaos of sorting the string. Splitting allows me to separate each individual word and join it back into one string to match/send the question/response. This is the end of the post, comment any suggestions/questions. 3 months ago
Hillo232
Hillo232
shared a Post
2 years ago
Here is an example of how to upload python packages onto pypi.org.
How to upload a python package
Python
Hillo232
Hillo232
shared a Post
2 years ago
Getting code using code may sound hard but it actually only takes a couple lines of code. I still have my copyrights.
Source Lines
Python
Hillo232
Hillo232
shared a Post
2 years ago
Contact API in python using the requests library. In the first example, we use headers which tells the website you are authorized. Some websites don't
Contact API Python
Python
Hillo232
Hillo232
shared a Post
2 years ago
This is a simple login system made in python using json.
Login System
Python
Hillo232
Hillo232
shared a Post
2 years ago
I went on to Jishaku's github, https://github.com/Gorialis/jishaku/tree/master/jishaku and I used Jishakus code and modified it to work with the bot I
Storage
Python
Hillo232
Hillo232
shared a Post
2 years ago
Screen Shot 2020-12-16 at 1.32.59 PM I was using PyNaCl for something but PyNaCl is not a module so I have to use the package search thing.
angrydoge
angrydoge
Dude! Its because you dont have the package installed! It searched installed packages! REEEEEEEEEEEEE @Hillo2322 years ago
RYANTADIPARTHI
RYANTADIPARTHI
Maybe report to bugs. because sometimes that happens.2 years ago
Hedgehawk11
Hedgehawk11
I have this too2 years ago
Hillo232
Hillo232
shared a Post
2 years ago
I am creating a discord bot with python but I need a database and I don't know how to create one.
Rayanami
Rayanami
Why do you need to create a database? I mean, there are so many data providers on the market, that you don't need to waste time and nerves in creating one. We should take advantage of such sort of services. In such a way, we help each other and keep businesses in the flow. Now, you should find the right data provider that meets your requirements. By the way, be attentive because many scammers can fool you. For more information about data providers read on https://www.globaldatabase.com/top-10-fe8 months ago
RYANTADIPARTHI
RYANTADIPARTHI
Try this link: https://docs.repl.it/misc/database2 years ago
Coder100
Coder100
No need to reinvent the wheel, go to settings to turn in explorer: https://repl.it/account#roles And then when you create a new repl you see the dB feature :) https://docs.repl.it/misc/database2 years ago
Hillo232
Hillo232
shared a Post
2 years ago
So this program basically takes the link you enter and looks for it on YT. It takes the information you want from youtube and gives you it.
Youtube video info
Python
Hillo232
Hillo232
shared a Post
2 years ago
So I have this discord bot that I made with python and I want to keep it alive 24/7 but up timer bot doesn't really work and I have tried mats hack pr
RYANTADIPARTHI
RYANTADIPARTHI
You need a http server to run it for long. Try hosting it on heroku.com.2 years ago
Coder100
Coder100
Sure, here is a working repl: https://repl.it/@Coder100/UnhealthyLimpingCarrier#main.py2 years ago
Hillo232
Hillo232
shared a Post
2 years ago
So I am trying to upload a module but I can't because repl.it has some problems connecting to pypi.org so can anyone tell me if I can use this code to
PattanAhmed
PattanAhmed
@Hillo232 Hi, What about Github? Have you tried to upload your module from Github?2 years ago
RYANTADIPARTHI
RYANTADIPARTHI
I don't think you shouldn't be touching this file. It's like a package file. It comes automatically when you import some outside source.2 years ago
Hillo232
Hillo232
shared a Post
2 years ago
So this morning I opened my python repl and I looked for the pencil and the expand sign but they weren't there. Can anyone please help.
Kookiez
Kookiez
Ah, the pencil? Well, repl.it took that feature away because of spammers (like the poopypants kid) and it's also been giving the repl.it team bugs. Websites work though, it's just consoles that you can't open.2 years ago
RYANTADIPARTHI
RYANTADIPARTHI
Sometimes repl doesn't have that. Sometimes i don't either. Try refreshing or making a new repl with the same code.2 years ago
InvisibleOne
InvisibleOne
could you send a screen shot2 years ago
Hillo232
Hillo232
shared a Post
2 years ago
Hey guys, today I will teach you how to web scrape with BeautifulSoup. Remember to read the websites ToS before scraping there site! First, you want t
GrahamScott2
GrahamScott2
How would I instead of searching in the vocabulary, search just in google?10 months ago
cuber1515
cuber1515
How would you do this if the element you wanted to get was a class. (I tried class="class" and it didn't work). And if it's important I was trying to do Amazon results = soup.find(class="s-desktop-content") The spotlight page ==> here Also where did the "data=word" come from in the vocabulary_elems=results.find("div",attrs={"data-word":variable}) and what does it do?2 years ago
DynamicSquid
DynamicSquid
Could you link a demo repl to show how it works?2 years ago
Hillo232
Hillo232
shared a Post
2 years ago
So I created this package and I hope to release it into python. Can anyone give me the code to actually create it, please?
BD103
BD103
Go to https://repl.it/@BD103/Python-Packaging-Template I hope it helps. Reply if you have any questions! :D2 years ago
BD103
BD103
I'll post a template in a bit. It's a lot to go through :)2 years ago
RYANTADIPARTHI
RYANTADIPARTHI
You might want to make a command template for your python package.2 years ago
Hillo232
Hillo232
shared a Post
2 years ago
Well, my repl has problems loading. It says unstable or something.
RYANTADIPARTHI
RYANTADIPARTHI
Thank you Hillo232!2 years ago
RYANTADIPARTHI
RYANTADIPARTHI
Yeah, it's a repl.it issue. They are having some problems.2 years ago
k9chelsea2
k9chelsea2
i think its a issue on repl.it's side its currently expiriencing some issues :(2 years ago
Hillo232
Hillo232
shared a Post
2 years ago
Two, how can I use the page after you click the submit button show a image of the file you entered?
Coder100
Coder100
Question 1 ping is what you are looking for Question 2 Your HTML form code: File: Submit Your php /action_page.php code: read this2 years ago
Hillo232
Hillo232
shared a Post
2 years ago
import random #butPoop=random.randint() #Pokemon= "" trainerelisapokemons=["Dogter","Lidral"] player_gold=100 player_pokemon=[" "," "," "," "," "," "
Hillo232
Hillo232
um I can't and i fixed the problem thanks!!!2 years ago
Coder100
Coder100
Hey, please attach your repl.2 years ago
Hillo232
Hillo232
shared a Post
2 years ago
Run the code and tell me what's wrong, please. :(
Pokemon Python No.1
Python
Hillo232
Hillo232
thanks a lot!!!2 years ago
Hillo232
Hillo232
Can you fix it for me and I might understand 2 years ago
Hillo232
Hillo232
I still don't get it2 years ago
Hillo232
Hillo232
shared a Post
2 years ago
My cade keeps on looping over and over. Please help.
Pokemon Python No.1
Python
Hillo232
Hillo232
Thanks, EveryOne!!!2 years ago
LTI2
LTI2
also give credits to game freak2 years ago
PattanAhmed
PattanAhmed
@Hillo232 Hi, Change your code like:- username=input("What is Your username: ") print("Ok pokemon trainer "+username+", you are being guided to Proffesor Oaks labrotory") starter = input("Proffesser Oak: Hi and welcome to the WORLD of pokemon!\n Here there are many pokemon including starters Choose your \nstarter! The starters are Hypseed, Flabal, Rawung?\n type your starter in all caps: ") starter = starter.upper() routelist=["route1","route2","route3","route4","route5","route6","route7","rout2 years ago