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
# Pretty print messages | |
# https://discord.com/developers/docs/topics/gateway#transport-compression | |
# https://github.com/Rapptz/discord.py/blob/8ba830eeb86a52e54c727e71436bfe0e9ea51526/discord/gateway.py#L491 | |
import json, base64, pprint, zlib | |
buffer = bytearray() | |
zlib_obj = zlib.decompressobj() | |
printer = pprint.PrettyPrinter() |
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 numpy as np | |
import cv2 | |
def read_camera_parameters(): | |
cam_mtx = np.loadtxt("cam_mtx.dat") | |
dist_params = np.loadtxt("dist_params.dat") | |
# cmtx = camera matrix, dist = distortion parameters | |
return cam_mtx, dist_params |
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
PS C:\Users\rocke\Downloads\tawau-master\tawau-master\tawau> ls -r | Select-String ghost | select Path, LineNumber, Line | |
Path LineNumber Line | |
---- ---------- ---- | |
C:\Users\rocke\Downloads\tawau-master\tawau-master\tawau\amp.hbs 17 {{amp_ghost_head}} | |
C:\Users\rocke\Downloads\tawau-master\tawau-master\tawau\default.hbs 7 {{!-- Ghost outputs... | |
C:\Users\rocke\Downloads\tawau-master\tawau-master\tawau\default.hbs 8 {{ghost_head}} | |
C:\Users\rocke\Downloads\tawau-master\tawau-master\tawau\default.hbs 22 {{!-- Ghost Content... | |
C:\Users\rocke\Downloads\tawau-master\tawau-master\tawau\default.hbs 23 <script type="text/... |
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 cv2 | |
import numpy as np | |
import pyzbar.pyzbar as pyzbar | |
img_file = "qr.png" | |
image = cv2.imread(img_file) | |
decodedObjects = pyzbar.decode(image) | |
for obj in decodedObjects: | |
print("Type:", obj.type) |
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
java -cp java-decompiler.jar org.jetbrains.java.decompiler.main.decompiler.ConsoleDecompiler -hdc=0 -dgs=1 -rsy=1 -rbr=1 -lit=1 -nls=1 -mpm=60 -lac=1 DragonBlockC-v1.4.72.jar decomp/; cd decomp; unzip -q DragonBlockC-v1.4.72.jar |
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
#!/usr/bin/bash | |
cat _chat.txt | sed "s|[[0-9 / , :]*][[:space:]]||" | grep -o ".*:" | sed 's/:.*//g' | tr -cd '[:print:]\r\n\t' | grep -v "^\s*$" | sort | uniq -c | sort -bnr | |
# cat file | replace [date/date/date , , , ] with "" | get everything before ":" | GET EVERYTHING BEFORE FIRST ":" | filter out non printing chars | idk tbh something to do with the count | idk I should man this | sorting ?? idk i shsould man this | |
# prints out most talkative in chat, w some false pos | |
# https://unix.stackexchange.com/a/39044/427069 -- sort - Get text-file word occurrence count of all words & print output sorted | |
# https://stackoverflow.com/a/3540639/3875151 -- bash - Removing non-displaying characters from a file |
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
#include <iostream> | |
using namespace std; | |
int power(int a, int b) { | |
int pow = 1; | |
if (b == 0) { | |
return pow; | |
} | |
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
cmake_minimum_required(VERSION 3.13) | |
project(ProjectName) | |
set(CMAKE_CXX_STANDARD 14) | |
add_executable(ProjectName main.cpp) | |
set(prefix "PATH_TO_MINGW_OR_SOMETHING_ELSE_WITH_SDL2_DEV_FILES_PASTED_INTO_IT_PATH_CANNOT_HAVE_SPACES") | |
#uses i686 32bit minwgw32 |
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
@echo off | |
rem ===================================================== | |
rem Converts a MP3 file to a M4R file using ffmpeg. | |
rem Usage: Drop a MP3 file at the top of this batch file. | |
rem ===================================================== | |
rem %~f1 = Full File Path, with drive letter | |
rem %~p1 = Drive Letter | |
rem %~p1 = Path Only | |
rem %~n1 = File Name |
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
#Incomplete | |
from sqlalchemy import ( | |
create_engine, | |
MetaData, | |
Table | |
) | |
from sqlalchemy.orm import sessionmaker | |
sqlite_engine = create_engine('sqlite:///main.db', echo=True) |
NewerOlder