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
{ | |
"people": [ | |
{ | |
"names": [ | |
"grinning" | |
], | |
"surrogates": "😀", | |
"unicodeVersion": 6.1 | |
}, | |
{ |
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
# Creates a fun suggested name for users | |
def suggested_name | |
prefix = rand < 0.25 ? "octo-" : "" | |
"#{adjectives.sample}-#{prefix}#{nouns.sample}" | |
end | |
ADJECTIVES = %w[ | |
animated | |
automatic | |
bookish |
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 | |
from discord.ext import commands | |
import sys, traceback | |
"""This is a multi file example showcasing many features of the command extension and the use of cogs. | |
These are examples only and are not intended to be used as a fully functioning bot. Rather they should give you a basic | |
understanding and platform for creating your own bot. | |
These examples make use of Python 3.6+ and the 1.0.0 version on the lib. |
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 timeit as _timeit | |
import math | |
import sys | |
import warnings | |
from dataclasses import dataclass, field | |
from typing import List | |
def timeit(stmt, *, setup='pass', repeat=5, number=0, precision=3, globals=None): | |
timer = _timeit.Timer(stmt, setup, globals=globals) |
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 contextlib | |
import imghdr | |
import io | |
import logging | |
logger = logging.getLogger(__name__) | |
try: | |
import wand.image | |
except ImportError: |
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
*.swp | |
*.py[cod] | |
venv/ | |
.venv/ |
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/env python3 | |
# encoding: utf-8 | |
""" | |
privatebin.py: uploads text to privatebin | |
using code from <https://github.com/r4sas/PBinCLI/blob/master/pbincli/actions.py>, | |
© 2017–2018 R4SAS <r4sas@i2pmail.org> | |
using code from <https://github.com/khazhyk/dango.py/blob/master/dango/zerobin.py>, | |
© 2017 khazhyk | |
""" |
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/env bash | |
if [ "$EUID" -ne 0 ]; then | |
echo "Please run as root" | |
exit | |
fi | |
tmp=$(mktemp --directory) | |
cd $tmp | |
wget --content-disposition 'https://caddyserver.com/download/linux/amd64?license=personal' |
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/env python3 | |
# encoding: utf-8 | |
import fileinput | |
def fix_sums(): | |
"""fixes a checksums file in this format: | |
\d4e9b804eb556f8140b17921 *C:\\TV\\My Show.mkv | |
\885083f72a4211a6f95eb380 *C:\\Movies\\My Adventure.mkv |
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/env python3 | |
# encoding: utf-8 | |
""" | |
Revisionist: logs Discord message edits and revisions | |
Copyright © 2017 Benjamin Mintz | |
https://bmintz.mit-license.org/@2017 | |
""" | |
import discord |
NewerOlder