Skip to content

Instantly share code, notes, and snippets.

View GhostofGoes's full-sized avatar

Chris Goes GhostofGoes

  • New Mexico, USA
  • 12:29 (UTC -06:00)
View GitHub Profile
@santiagobasulto
santiagobasulto / README.md
Last active May 16, 2021 10:13
Download HumbleBundle books in batch with a simple Python script.

Download HumbleBundle books

This is a quick Python script I wrote to download HumbleBundle books in batch. I bought the amazing Machine Learning by O'Reilly bundle. There were 15 books to download, with 3 different file formats per book. So I scratched a quick script to download all of them in batch.

(Final Result: books downloaded)

@supposedly
supposedly / arg-parsers.md
Last active December 16, 2021 09:53
This list is probably out of date. It hasn't been updated since September 2019.

Big ol' list of third-party Python 3 argparse alternatives

Bold+italics means the lib is probably worth checking out above the rest. joffrey is my own.

argparse wrappers

@EvieePy
EvieePy / music.py
Last active March 7, 2024 21:00
Basic music with playlist support on Rewrite
"""
Please understand Music bots are complex, and that even this basic example can be daunting to a beginner.
For this reason it's highly advised you familiarize yourself with discord.py, python and asyncio, BEFORE
you attempt to write a music bot.
This example makes use of: Python 3.6
For a more basic voice example please read:
https://github.com/Rapptz/discord.py/blob/rewrite/examples/basic_voice.py
@nessus42
nessus42 / destiny-networking-revised.md
Last active April 19, 2024 21:39
How Networking Works in Destiny 1 and How It Will Differ in Destiny 2 (According to Bungie, Redux)
@EvieePy
EvieePy / bot_example.py
Last active April 24, 2024 09:30
A Cogs Example for the rewrite version of - discord.py
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.2 and the rewrite version on the lib.
@nessus42
nessus42 / faq.md
Last active November 6, 2021 01:35
Destiny Networking Article FAQ

Q. Bungie says that there will be no more host migrations, ever, in Destiny 2. Is that right?

A. Yes, it's true that that's what they've said. I'm not sure that I believe it, however. I certainly believe that what Bungie said will be true for PvP matches and for raids. For both of these cases, the console-hosted Physics Hosts of D1 did not always prove reliable-enough for a seamless experience.

On the other hand, the console-hosted Physics Hosts, in my experience, worked flawlessly in almost all other situations. Why fix something that's not broken? While at the same time spinning up expensive servers for no good reason?

Consider too the situation where you are playing the story campaign by yourself in an instanced Bubble. You don't need a remote Physics Host for this. Clearly, the entire game (except for the Mission Host) can run on your console. Why spin up a Physics Host in the cloud for solo play?

So let's assume for the moment, that when playing missions solo, there is no Physics Host,

@doctaphred
doctaphred / ntfs-filenames.txt
Last active May 9, 2024 13:27
Invalid characters for Windows filenames
Information from https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file :
Use any character in the current code page for a name, including Unicode
characters and characters in the extended character set (128–255), except
for the following:
- The following reserved characters:
< (less than)
> (greater than)
@EvieePy
EvieePy / error_handler.py
Last active January 16, 2024 15:12
Simple Error Handling for ext.commands - discord.py
"""
If you are not using this inside a cog, add the event decorator e.g:
@bot.event
async def on_command_error(ctx, error)
For examples of cogs see:
https://gist.github.com/EvieePy/d78c061a4798ae81be9825468fe146be
For a list of exceptions:
https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#exceptions
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Unittest with DocTests."""
import doctest
import unittest
@Ravenslofty
Ravenslofty / fw.py
Last active March 19, 2017 03:21
What is this "readability" you speak of?
from sys import*
o=ord
g=lambda s:print(''.join(map(lambda c:((c,chr(o(c)+65248))[o(c)<127]," ")[c==" "],s)))
if len(argv)>1:g(' '.join(argv[1:]))
else:
while 1:g(input())