- important parts of "algorithm engineering"
- "effective c++"
- 6.046
- 6.889
- lectures 1-4
- psets 1, 2
| <hmtl> | |
| <div id="map-canvas"></div> | |
| <style> | |
| html, body, #map-canvas { | |
| height: 90%; | |
| margin: 5px; | |
| padding: 1px; | |
| } | |
| </style> | |
| <script src="https://maps.googleapis.com/maps/api/js?sensor=false&libraries=geometry,places&ext=.js"></script> |
| """ | |
| python3 jfk.py | |
| """ | |
| from collections import namedtuple | |
| Stop = namedtuple('Stop', ['sid', 'seq']) | |
| stops_data = [ | |
| Stop(sid=0, seq=0), | |
| Stop(sid=1, seq=1), |
For flask servers using gunicorn, which can be configured to use any type of worker. We use gevent workers (flag -k) (which use the libuv event loop under-the-hood, see http://flask.pocoo.org/docs/0.12/deploying/wsgi-standalone/): http://docs.gunicorn.org/en/latest/settings.html#worker-class
This means we can push tasks into the gevent event loop and have them execute outside of a flask request context. As long as all the gunicorn workers aren’t processing these tasks and blocking flask request execution, this should not affect performance.
| $$T(\omega) = \begin{cases} | |
| 1, & \text{if } \omega > \$0, \\ | |
| 0, & \text{otherwise}. | |
| \end{cases}$$ |
| Incidents | |
| 11 | |
| 14 | |
| 6 | |
| 39 | |
| 3 | |
| 9 | |
| 6 | |
| 1 | |
| 8 |
| { | |
| "name": "items", | |
| "children": [ | |
| { | |
| "name": "Home Furnishings", | |
| "children": [ | |
| { | |
| "name": "Wall and Window Covering", | |
| "value": 98 | |
| }, |
| check_for_opening () { | |
| res=`curl --silent "https://unionpt.fullslate.com/employees/4320?iid=7959&services%5B%5D=208" | grep "Next opening"` | |
| if [ -n "`echo $res | grep -e '.*Thursday, September 5.*'`" ] | |
| then | |
| echo "No openings found, sleeping..." | |
| else | |
| say "Found an appointment opening" | |
| fi | |
| } |
| # LVDB - LLOOGG Memory DB | |
| # Copyriht (C) 2009 Salvatore Sanfilippo <antirez@gmail.com> | |
| # All Rights Reserved | |
| # TODO | |
| # - cron with cleanup of timedout clients, automatic dump | |
| # - the dump should use array startsearch to write it line by line | |
| # and may just use gets to read element by element and load the whole state. | |
| # - 'help','stopserver','saveandstopserver','save','load','reset','keys' commands. | |
| # - ttl with milliseconds resolution 'ttl a 1000'. Check ttl in dump! |