zsh -c "$(curl -sL https://gist.githubusercontent.com/speto/84263183e9d8d17343afcad217269ea7/raw/touch_id_sudo.sh)"- Basic activation script https://birkhoff.me/Persistent-sudo-Touch-ID-Authentication-on-macOS/
zsh -c "$(curl -sL https://gist.githubusercontent.com/speto/84263183e9d8d17343afcad217269ea7/raw/touch_id_sudo.sh)"| import asyncio | |
| loop = asyncio.get_event_loop() | |
| async def hello(): | |
| await asyncio.sleep(3) | |
| print('Hello!') | |
| if __name__ == '__main__': | |
| loop.run_until_complete(hello()) | |
| * |
| from datetime import datetime | |
| from sqlalchemy import Column, Integer, DateTime, ForeignKey | |
| from sqlalchemy.orm import relationship | |
| from sqlalchemy.ext.declarative import declared_attr | |
| from flask_security import current_user | |
| class AuditMixin(object): | |
| created_at = Column(DateTime, default=datetime.now) | |
| updated_at = Column(DateTime, default=datetime.now, onupdate=datetime.now) |
| # This work is licensed under the GNU Public License (GPL). | |
| # To view a copy of this license, visit http://www.gnu.org/copyleft/gpl.html | |
| # For more information visit this blog post http://mpcabd.igeex.biz/python-celery-asynchronous-task-decorator/ | |
| # Written by Abd Allah Diab (mpcabd) | |
| # Email: mpcabd ^at^ gmail ^dot^ com | |
| # Website: http://mpcabd.igeex.biz | |
| from django.utils.decorators import available_attrs |
| Latency Comparison Numbers (~2012 except when noted) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml"> | |
| <head> | |
| <meta http-equiv="content-type" content="text/html; charset=utf-8"/> | |
| <script type="text/javascript" src="jquery-1.7.1.min.js"></script> | |
| <script type="text/javascript"> | |
| $(document).ready(function () { | |
| $.getJSON('estados_cidades.json', function (data) { |