This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta name="viewport" content="width=device-width,initial-scale=1.0"/> | |
<body id="body"> | |
<div id="con"> | |
<div id="red"></div> | |
<div id="blue"></div> | |
<div id="yellow"></div></div> | |
<style> | |
#body{ | |
position: relative; | |
background-color: #000; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests as req | |
from bs4 import BeautifulSoup as bs | |
def currency_convert(frm:str, to:str, amount:int): | |
frm = frm.upper() | |
to = to.upper() | |
#print(frm, to, amount) | |
url = f"https://xe.com/currencyconverter/convert/?Amount={amount}&From={frm}&To={to}" #you can use your api if you have | |
data = req.get(url).text | |
soup = bs(data, "html.parser") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import discord, re, pytz, time | |
from discord.ext import commands, tasks | |
#from datetime import datetime | |
intents = discord.Intents.default() | |
intents.members = True | |
intents.presences = True | |
intents.message_content = True | |
bot = commands.AutoShardedBot(shard_count=1,command_prefix='.',intents=intents) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def time_format(delta): #0:40:45.3456456 | |
delta = str(delta) | |
time = "" | |
lst = delt.split(".")[0].split(":") | |
if(len(lst)<=3): | |
h,m,s = delt.split(".")[0].split(":") | |
time = f"{h}hr, {m}min, {s}sec" | |
elif(len(lst)>3): | |
d,h,m,s = delt.split(".")[0].split(":") | |
time = f"{d}day, {h}hr, {m}min, {s}sec" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def sum(a, b, c ): | |
return a + b + c | |
def printBoard(xState, zState): | |
zero = 'X' if xState[0] else ('O' if zState[0] else 0) | |
one = 'X' if xState[1] else ('O' if zState[1] else 1) | |
two = 'X' if xState[2] else ('O' if zState[2] else 2) | |
three = 'X' if xState[3] else ('O' if zState[3] else 3) | |
four = 'X' if xState[4] else ('O' if zState[4] else 4) | |
five = 'X' if xState[5] else ('O' if zState[5] else 5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form id="esportsForm"> | |
<!-- <label for="org">Organization:</label> --> | |
<input type="text" id="org" placeholder="Org Name" name="org"> | |
<br> | |
<br> | |
<!-- <label for="tname">Tournament Name:</label> --> | |
<input type="text" id="tname" placeholder="Tournament Name" name="tname"> | |
<table> | |
<thead> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- templates/index.html --> | |
<html> | |
<body> | |
<h1>Real-Time Website</h1> | |
<div id="data-container"></div> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.1.3/socket.io.js"></script> | |
<script> | |
const socket = io.connect('http://' + document.domain + ':' + location.port); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import discord | |
import os | |
from discord.ext import commands | |
import bs4 | |
from bs4 import BeautifulSoup | |
#import youtube_dl | |
intents = discord.Intents.default() | |
intents.message_content = True | |
intents.reactions = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@bot.command() | |
async def play(ctx,url2): | |
vc = await ctx.author.voice.channel.connect() | |
#FFMPEG_OPTIONS = {'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5', 'options': '-vn'} | |
source = await discord.FFmpegOpusAudio.from_probe(url2) | |
vc.play(source) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
afks = [] | |
bot = "" | |
async def afk_filter(message): | |
now = message.created_at | |
for i in afks: | |
if message.author.id == i["id"]: | |
time = str(now-i['time']).split(".")[0] | |
afks.remove(i) | |
return await message.reply(f"Your Afk Is Disabled After {time} ") | |
NewerOlder