This file contains hidden or 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
error[E0271]: type mismatch resolving `<fn() -> ! {std::process::abort} as core::ops::FnOnce<()>>::Output == T` | |
--> /home/marc/.cargo/registry/src/github.com-1ecc6299db9ec823/safe_unwrap-0.3.0/src/lib.rs:130:14 | |
| | |
130 | self.unwrap_or_else(std::process::abort) | |
| ^^^^^^^^^^^^^^ expected !, found type parameter | |
| | |
= note: expected type `!` | |
found type `T` | |
error: aborting due to previous error |
This file contains hidden or 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
# from https://pythonhosted.org/Logbook/api/handlers.html#logbook.Handler | |
# | |
# > By default messages sent to that handler will not go to a handler on an | |
# > outer level on the stack, if handled. This can be changed by setting | |
# > bubbling to True. This setup for example would not have any effect: | |
# > | |
# > handler = NullHandler(bubble=True) | |
# > handler.push_application() | |
# > | |
# > Whereas this setup disables all logging for the application: |
This file contains hidden or 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
from flask import Flask, render_template | |
from flask_wtf import Form | |
from wtforms import TextField, PasswordField, BooleanField | |
from wtforms.validators import Required, EqualTo, Email, Length | |
from flask_bootstrap import Bootstrap | |
class UserForm(Form): | |
username = TextField('Username', [Required()]) | |
password = PasswordField('Password', |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 python | |
# coding=utf8 | |
from binascii import hexlify | |
import os | |
from passlib.hash import bcrypt | |
dummy = bcrypt(use_defaults=True) | |
salt = dummy.salt |
This file contains hidden or 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 python | |
# coding=utf8 | |
# before, in virtualenv: | |
# pip install testscenarios testtools | |
# (unfortunately, testscenarios doesn't list testtools as a dependency) | |
# "real code" | |
class Backend(object): | |
pass |
This file contains hidden or 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
# compare: http://packages.python.org/Logbook/api/handlers.html | |
$ python logbook-test.py | |
$ python logbook-test2.py | |
$ python logbook-test3.py | |
$ python logbook-test4.py | |
[2012-03-14 12:45] INFO: Generic: Hello, world |
This file contains hidden or 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 python | |
# coding=utf8 | |
# for output, see https://gist.github.com/820741 | |
import direct.directbase.DirectStart | |
from panda3d.core import MaterialCollection | |
model = loader.loadModel('testmodel.egg') | |
find_terms = ('playerColorA', 'playerColorB', 'nonsense', '') |
This file contains hidden or 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
DirectStart: Starting the game. | |
Known pipe types: | |
glxGraphicsPipe | |
(all display modules loaded.) | |
all materials | |
Material playerColorB a(0.152049 0.8 0.183424 1) d(0.152049 0.8 0.183424 1) s(0.25 0.25 0.25 1) s12.5 l0 t0 | |
Material playerColorA a(0.8 0.126309 0.388125 1) d(0.8 0.126309 0.388125 1) s(0.25 0.25 0.25 1) s12.5 l0 t0 | |