Skip to content

Instantly share code, notes, and snippets.

Boris Feld Lothiraldan

Block or report user

Report or block Lothiraldan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View pyproject.toml
[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/**/*"]
View pyproject.toml
[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"
View keybase.md

Keybase proof

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:

View pyramid_tweens.py
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
View Django gitignore
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
View str_encode_thread.py
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")
@Lothiraldan
Lothiraldan / .zshrc
Last active Apr 27, 2016
Mac OS X zshrc prank
View .zshrc
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)&
View index.html
<code>
<test@email.com>
</code>
View gist:2e4b36ac55946ff0ba3b
import asyncio
from aiohttp.web import Application, Response
@asyncio.coroutine
def resource(request):
return Response(text=repr(request.match_info))
@asyncio.coroutine
View gist:87bf5fc9fba604ececa0
from flask import Flask, render_template
app = Flask(__name__)
def gen_page(page):
def endpoint():
return render_template(page, page_name=page)
endpoint.__name__ = page
You can’t perform that action at this time.