There should be syntax-highlighed python below this line, right?
print("hi")| import json | |
| import base64 | |
| import requests | |
| import mimetypes | |
| import urllib.parse | |
| from pprint import pprint | |
| from requests_oauthlib import OAuth1 | |
| CONSUMER_KEY = "INSERT KEY HERE" | |
| CONSUMER_SECRET = "INSERT SECRET HERE" |
| # This is more of an idea than a actual module - although you can use it as such. | |
| # A few things you could do: | |
| # - split the fmt_spec into comma-separated arguments which can be passed into the function | |
| # - make a format method part of the class itself instead of splatting the object into format | |
| class FormatFuncs(dict): | |
| def register(self, func): | |
| self[func.__name__] = type(func.__name__, (), { | |
| "__format__": lambda self, fmt_spec: func(fmt_spec) | |
| })() |
| # Fill this out with your real username/password | |
| USERNAME = "???" | |
| PASSWORD = "???" |
| # Here we create a metaclass that effectively turns a class scope into a different programming environment where setting variables under one name saves them to another | |
| # This level of madness requires Python 3 to run. | |
| class CrazyDict(dict): | |
| def __setitem__(self, item, value): | |
| super().__setitem__("potato_" + str(item), value) | |
| class CrazyMeta(type): | |
| def __prepare__(*args, **kwargs): | |
| return CrazyDict() |
I hereby claim:
To claim this, I am signing this object:
| """ | |
| Iterator diffing: a response to | |
| https://www.reddit.com/r/learnpython/comments/7o0swm/interleaving_iterators/ | |
| MIT License: | |
| Copyright (c) 2017 Ben Burrill | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights |
| Section "InputClass" | |
| Identifier "libinput touchpad custom" | |
| MatchIsTouchpad "on" | |
| MatchDevicePath "/dev/input/event*" | |
| Driver "libinput" | |
| # Map the first two buttons (normally left click and middle click) to both be left click | |
| # so that 2/3 of the touchpad is devoted to left click and 1/3 to right click. | |
| # I'm not sure, but probably on a 2 button touchpad this would eliminate right click, so | |
| # be aware. |
| #!/usr/bin/env bash | |
| # Runs and auto-updates OpenXcom nightlies in a portable environment | |
| # By default, this script will try to download and use the latest | |
| # nightly. If it finds a newer version than you already have, it will | |
| # prompt you (with a zenity popup) to ask if you actually want to | |
| # download it. | |
| # | |
| # If you want to stick to a particular version and don't want the popup | |
| # telling you to update, you can change the $here/versions/greatest | |
| # symlink to point to a specific AppImage rather than the default |