I hereby claim:
- I am kwarunek on github.
- I am kwarunek (https://keybase.io/kwarunek) on keybase.
- I have a public key whose fingerprint is 1498 A1EA CD8D 3D6C F84F 62B0 707B 55C9 4E31 E557
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| \n | |
| ============= HOST: ==========\n | |
| \n | |
| local_ip: %{local_ip}\n | |
| local_port: %{local_port}\n | |
| remote_ip: %{remote_ip}\n | |
| remote_port: %{remote_port}\n | |
| \n | |
| ======= CONNECTION: ==========\n | |
| \n |
| import asyncio | |
| import socket | |
| class UDPClient(): | |
| def __init__(self, host, port, loop=None): | |
| self._loop = asyncio.get_event_loop() if loop is None else loop | |
| self._sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | |
| self._sock.setblocking(False) | |
| self._addr = (host, port) |
| import os | |
| import asyncio | |
| import sys | |
| from asyncio.streams import StreamWriter, FlowControlMixin | |
| reader, writer = None, None | |
| @asyncio.coroutine | |
| def stdio(loop=None): |
| '''cjson, jsonlib, simplejson, and yajl also use C code | |
| demjson did not use C code, but was too painfully slow to benchmark | |
| (took about 20 seconds for these tests) | |
| ''' | |
| import json | |
| import sys | |
| import time | |
| with open('doc.json') as f: |
| import logging | |
| import tornado | |
| import tornado.gen | |
| from tornado.iostream import IOStream | |
| from tornado.ioloop import IOLoop | |
| from tornado.concurrent import Future | |
| import socket | |
| import tornado.ioloop | |
| import tornado.web | |
| import subprocess | |
| from tornado import gen | |
| @tornado.gen.coroutine | |
| def test(): | |
| cmd = "echo 'test' | grep test" | |
| data = yield gen.Task(_run, cmd) | |
| print(data) |
| # encoding : utf-8 | |
| require 'openssl' | |
| require 'digest/sha1' | |
| require 'base64' | |
| module Aws | |
| extend self | |
| def signed_url(path, expire_date) | |
| digest = OpenSSL::Digest::Digest.new('sha1') | |
| can_string = "GET\n\n\n#{expire_date}\n/#{S3_BUCKET}/#{path}" |
| import itertools | |
| import functools | |
| import fnmatch | |
| import os | |
| from StringIO import StringIO | |
| import yaml | |
| from yaml.parser import ParserError | |
| import voluptuous as V |