from concurrent.futures import ThreadPoolExecutor | |
from functools import partial, wraps | |
import time | |
import tornado.ioloop | |
import tornado.web | |
EXECUTOR = ThreadPoolExecutor(max_workers=4) |
<?xml version="1.0" encoding="UTF-8" ?> | |
<Data> | |
<Series> | |
<id>83462</id> | |
<Actors>|Nathan Fillion|Stana Katic|Molly C. Quinn|Jon Huertas|Seamus Dever|Tamala Jones|Susan Sullivan|Ruben Santiago-Hudson|Monet Mazur|</Actors> | |
<Airs_DayOfWeek>Monday</Airs_DayOfWeek> | |
<Airs_Time>10:00 PM</Airs_Time> | |
<ContentRating>TV-PG</ContentRating> | |
<FirstAired>2009-03-09</FirstAired> | |
<Genre>|Drama|</Genre> |
# coding: utf-8 | |
try: | |
import cPickle as pickle | |
except ImportError: | |
import pickle | |
try: | |
import hashlib | |
sha1 = hashlib.sha1 |
# Assuming an Ubuntu Docker image | |
$ docker run -it <image> /bin/bash |
Hi Nicholas,
I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:
The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't
-
use English (UK, Macintosh) as the base keyboard layout
-
https://help.ubuntu.com/community/AppleKeyboard#Ubuntu_11.10_up_to_recent (steps 1,2,3) to fix wrong keys (§± and `~)
-
dconf-editor
org.gnome.desktop.input-sources.xkb-options
~>['lv3:lalt_switch', 'lv3:ralt_alt']
-
compizconfig-settings-manager (ccsm)
desktop > ubuntu unity plugin > general > key to show the menu bar:
package main | |
import ( | |
"encoding/json" | |
"os" | |
"reflect" | |
"text/template" | |
) |
import boto3 | |
from boto3.session import Session | |
def assume_role(arn, session_name): | |
"""aws sts assume-role --role-arn arn:aws:iam::00000000000000:role/example-role --role-session-name example-role""" | |
client = boto3.client('sts') | |
account_id = client.get_caller_identity()["Account"] | |
print(account_id) |