This file contains hidden or 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
from hashlib import md5 | |
from typing import Any, Coroutine, Union, cast | |
from js2py.evaljs import EvalJs # type: ignore | |
from js2py.translators.translating_nodes import trans # type: ignore | |
from js2py.translators.translator import DEFAULT_HEADER # type: ignore | |
def make_js_program(body: list[Any]) -> dict[str, Any]: | |
return {"type": "Program", "body": body} |
This file contains hidden or 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
var findModule = (item) => Object.values(webpackJsonp.push([[],{['']:(_,e,r)=>{e.cache=r.c}}, [['']]]).cache).find(m=>m.exports&&m.exports.default&&m.exports.default[item]!==void 0).exports.default; | |
findModule('sendMessage').sendMessage = (sendMessage => async(id, message, ...params) => { | |
if (message['content'].startsWith("getinfo <:") || message['content'].startsWith("getinfo <a:")) { | |
let arr = [] | |
message.validNonShortcutEmojis.forEach(emoji => { | |
var emojiuse = message['content'].replace('getinfo ', '') | |
arr.push(` ${emojiuse}\n`) | |
arr.push(`Emoji \`${emoji.name}\` (${emoji.id})\n`) | |
arr.push(`Emoji Animated \`${emoji.animated}\` \n`) | |
arr.push(`Emoji Available \`${emoji.available}\` \n`) |
This file contains hidden or 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 | |
from discord.ext import commands | |
from discord.http import Route | |
import uuid | |
bot = commands.Bot(command_prefix='`') | |
bot.poll_data = {} | |
def make_buttons(tag, data): |
This file contains hidden or 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 | |
from discord.ext import commands | |
from discord.http import Route | |
bot = commands.Bot(command_prefix='!') | |
@bot.command('youtube') | |
async def youtube(ctx): | |
voice = ctx.author.voice |
This file contains hidden or 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 threading | |
import asyncio | |
import time, math, random | |
import sounddevice as sd #from https://python-sounddevice.readthedocs.io/en/0.3.14/ | |
# Gets audio from the microphone | |
class MicrophoneAudioSource(discord.PCMAudio): | |
def __init__(self, duration_ms=20): | |
self.SAMP_RATE_HZ = 48000.0 #48 KHz |
This file contains hidden or 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
# Command: | |
adb shell am start -n "com.oculus.vrshell/.MainActivity" -d apk://com.oculus.browser -e uri https://aframe.io/aframe/examples/showcase/spheres-and-fog/ | |
# Output: | |
09-22 03:59:12.368 3820 20762 I ActivityManager: START u0 {act=null typ=null flg=0x10000000 cmp=ComponentInfo{com.oculus.vrshell/com.oculus.vrshell.MainActivity}} from uid 2000 on display 0 | |
09-22 03:59:12.375 3820 20762 W ActivityManager: GearVR not ready: not allowed to start VR Activity. activity=ComponentInfo{com.oculus.vrshell/com.oculus.vrshell.MainActivity} intent=Intent { dat=apk://com.oculus.browser flg=0x10800000 cmp=com.oculus.vrshell/.MainActivity launchParam=MultiScreenLaunchParams { mDisplayId=0 mBaseDisplayId=0 mFlags=0 } (has extras) } isVrActivity=true | |
09-22 03:59:13.024 10937 10959 V VRSVC : (LogEvent.java:206) yTqX [onLaunchCancelled reason=hmt pIntent=Intent { dat=apk://com.oculus.browser flg=0x10800000 cmp=com.oculus.vrshell/.MainActivity launchParam=MultiScreenLaunchParams { mDisplayId=0 mBaseDisplayId=0 mFlags=0 |
This file contains hidden or 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
to check if the server works - https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice | |
stun: | |
stun.l.google.com:19302, | |
stun1.l.google.com:19302, | |
stun2.l.google.com:19302, | |
stun3.l.google.com:19302, | |
stun4.l.google.com:19302, | |
stun.ekiga.net, | |
stun.ideasip.com, |
This file contains hidden or 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
#!/usr/bin/env python3 | |
import aiohttp | |
from aiohttp import web | |
from urllib.parse import urlencode | |
GOOGLE_SECRET = '<google secret>' | |
GOOGLE_CLIENT_ID = '<google client id>' | |
async def google_oauthcallback(request): |
This file contains hidden or 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
#!/usr/bin/env python3.4 | |
import urllib.request | |
import asyncio | |
def return_response(url): | |
return urllib.request.urlopen(url).read() | |
@asyncio.coroutine | |
def read_page(loop, url): |