start new:
tmux
start new with session name:
tmux new -s myname
from multiprocessing import Pool | |
from functools import partial | |
def _pickle_method(method): | |
func_name = method.im_func.__name__ | |
obj = method.im_self | |
cls = method.im_class | |
if func_name.startswith('__') and not func_name.endswith('__'): #deal with mangled names | |
cls_name = cls.__name__.lstrip('_') | |
func_name = '_' + cls_name + func_name |
# dont do this | |
this_function_name(foo, bar | |
baz) | |
# do this | |
cramers_version( | |
foo, bar, baz) | |
# allow this | |
cramers_version(foo, bar, |
import asyncio | |
@asyncio.coroutine | |
def waiting(r): | |
print("hello from waiting -", r) | |
yield from asyncio.sleep(2) | |
print("bye from waiting -", r) | |
return r | |
import uuid | |
import psycopg2 | |
from django.conf import settings | |
from django.db.backends import utils | |
from django.db.backends.postgresql.base import \ | |
DatabaseWrapper as PostgresqlDatabaseWrapper | |
from django.db.backends.postgresql.base import * | |
Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.
This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would
package auth | |
import ( | |
"context" | |
"net/http" | |
"strings" | |
"google.golang.org/grpc/metadata" | |
"github.com/andela/micro-api-gateway/pb/authorization" |