This file contains hidden or 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
Python 3.6.4 (default, Mar 23 2018, 08:00:10) | |
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> def opencell_gen(i): | |
... a = i | |
... def f(b): | |
... b = a | |
... a = yield f.__closure__[0] | |
... while True: | |
... a = yield None |
This file contains hidden or 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 | |
def build_command(*args): | |
command = '*' + str(len(args)) + '\r\n' | |
for arg in args: | |
command += '$' + str(len(arg)) + '\r\n' | |
command += arg + '\r\n' | |
return command.encode('utf-8') |
This file contains hidden or 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 | |
import random | |
class Hub(): | |
def __init__(self): | |
self.subscriptions = set() | |
def publish(self, message): |
This file contains hidden or 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
""" | |
package_getter.py - Get all release artifacts for a given package | |
and version from the public pypi | |
""" | |
import os | |
import sys | |
import hashlib | |
import requests | |
from bs4 import BeautifulSoup |
This file contains hidden or 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
# remove your wheels | |
rm -r ~/Library/Caches/pip/wheels/* | |
# update brew | |
brew update | |
brew upgrade | |
brew install openssl #if needed | |
brew unlink openssl #if needed | |
# add some flags variables to your environment so your builds | |
# can find openssl headers and shared libs | |
export ARCHFLAGS="-arch x86_64" |