This file contains 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 aiohttp import web | |
from fastapi import FastAPI | |
from fastapi.staticfiles import StaticFiles | |
from starlette.requests import Request as ASGIRequest | |
from aiohttp_asgi import ASGIResource | |
aiohttp_app = web.Application() | |
app = FastAPI() |
This file contains 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
import random | |
import itertools | |
ord_a = ord('a') | |
ord_z = ord('z') | |
ord_A = ord('A') | |
ord_Z = ord('Z') | |
alpha = [chr(i) for i in range(ord_a, ord_z)] | |
ALPHA = [chr(i) for i in range(ord_A, ord_Z)] | |
alphanum = alpha+ALPHA+list('0123456789') |
This file contains 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
syntax = "proto3"; | |
package helloworld; | |
service Greeter { | |
rpc SayHello (HelloRequest) returns (HelloResponse); | |
rpc SearchResults (Empty) returns (SearchResponse); | |
} | |
message HelloRequest { |
This file contains 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
import asyncio | |
# also consider asyncio.Semaphore(10) see https://docs.python.org/3/library/asyncio-sync.html#semaphore | |
async def unordered_bulks(size, aiterable): | |
tasks = set() | |
async for task in aiterable: | |
tasks.add(task) | |
if len(tasks)>=size: | |
for coro in asyncio.as_completed(tasks): | |
yield coro |
This file contains 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 | |
from __future__ import print_function | |
import argparse | |
import os | |
import tensorflow as tf | |
# from tensorflow.python.framework import graph_util | |
# from tensorflow.python.framework import graph_io |
This file contains 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
# add the below to your ~/.bash_profile | |
parse_git_branch() { | |
[ -d .git ] && { | |
echo -n '@' | |
git rev-parse --abbrev-ref HEAD | |
} | |
} | |
export PS1='[\u@\h \W$(parse_git_branch)]\$ ' |
This file contains 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
import tensorflow as tf | |
import numpy as np | |
import math | |
PADDING_VALID, PADDING_SAME = 'VALID', 'SAME' | |
FORMAT_NHWC, FORMAT_NCHW = 'NHWC', 'NCHW' | |
# TODO: support N=? | |
def rnd_pooling2d(inputs, ksize=2, strides=2, padding=PADDING_VALID, data_format=FORMAT_NHWC, name=None): |
This file contains 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
version: '3' | |
services: | |
postgres: | |
image: "postgres:9.6" | |
environment: | |
POSTGRES_USER: awx | |
POSTGRES_PASSWORD: awxpass | |
POSTGRES_DB: awx | |
rabbitmq: |
This file contains 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
diff --git a/README.md b/README.md | |
index f224b04..c272d09 100644 | |
--- a/README.md | |
+++ b/README.md | |
@@ -186,7 +186,8 @@ then just `pip install dumb-init`. | |
## Usage | |
Once installed inside your Docker container, simply prefix your commands with | |
-`dumb-init`. | |
+`dumb-init` (and make sure that you're using [the recommended JSON |
This file contains 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
AES128-GCM-SHA256 | |
AES128-SHA | |
AES128-SHA256 | |
AES256-GCM-SHA384 | |
AES256-SHA | |
AES256-SHA256 | |
CAMELLIA128-SHA | |
CAMELLIA256-SHA | |
DES-CBC3-SHA | |
DHE-DSS-AES128-GCM-SHA256 |
NewerOlder