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 socket | |
# Socket part | |
ANY = "0.0.0.0" | |
MCAST_ADDR = "237.252.249.227" | |
MCAST_PORT = 1600 | |
#create a UDP socket | |
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP) | |
#allow multiple sockets to use the same PORT number | |
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT, 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
[tool.poetry] | |
name = "balto" | |
version = "0.1.2" | |
description = "" | |
authors = ["Boris Feld <lothiraldan@gmail.com>"] | |
packages = [ | |
{include = "balto/**/*.py"} | |
] | |
include = ["balto/web_interfaces/balto_react/build/**/*"] | |
exclude = ["balto/web_interfaces/balto_react/node_modules/**/*", "balto/web_interfaces/simple/src/elm-stuff/**/*"] |
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
[tool.poetry] | |
name = "balto" | |
version = "0.1.2" | |
description = "" | |
authors = ["Boris Feld <lothiraldan@gmail.com>"] | |
include = ["balto/**/*.py", "balto/web_interfaces/balto_react/build/**/*"] | |
exclude = ["balto/web_interfaces/balto_react/node_modules/**/*"] | |
[tool.poetry.dependencies] | |
python = "^3.6 || ^3.7" |
I hereby claim:
- I am lothiraldan on github.
- I am lothiraldan (https://keybase.io/lothiraldan) on keybase.
- I have a public key ASAwij8gw4koGC6oQJDJb9VuNVrP7MwRY9jJhqrwZT4Cgwo
To claim this, I am signing this object:
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
def wrapped(request, *args, **kwargs): | |
""" Call the lifecycles methods with these arguments: | |
Pyramid pre callbacks will receive these arguments: | |
(None, request) | |
Flask post callbacks will receive these arguments: | |
(None, response) | |
Flask failing callbacks will receive these arguments: | |
(None, exception) | |
""" | |
from pyramid.response import Response |
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
# Byte-compiled / optimized / DLL files | |
__pycache__/ | |
*.py[cod] | |
*$py.class | |
# C extensions | |
*.so | |
# Distribution / packaging | |
.Python |
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 time | |
import threading | |
def to_latin_1(event, value): | |
print(time.time(), "Before encode") | |
value.encode('latin-1', 'ignore') | |
print(time.time(), "After encode") | |
event.set() | |
print(time.time(), "Event set") |
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
ROOT_UID=0 | |
if [ $UID != $ROOT_UID ]; then | |
sudo osascript -e "set Volume 10" | |
fi | |
fortune -a | tee /dev/fd/2 | say -v $(say -v "?" | cut -d ' ' -f 1 | ruby -e 'puts STDIN.readlines.shuffle' | head -n 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
<code> | |
<test@email.com> | |
</code> |
NewerOlder