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 | |
import random | |
async def slow_action(): | |
await asyncio.sleep(random.randrange(1, 5)) | |
async def my_range(n): | |
i = 0 | |
while i < n: |
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 | |
import random | |
async def slow_action(): | |
await asyncio.sleep(random.randrange(1, 5)) | |
async def my_range(n): | |
i = 0 | |
while i < n: |
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 | |
# -*- coding: utf-8 -*- | |
import sys, re | |
import itertools | |
from functools import wraps | |
from pyquery import PyQuery as pq | |
class scrape: | |
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
function auto_activate { | |
SEARCHPATH=`pwd` | |
function activate_env { | |
# ZSH outputs errors for the ls * command if you don't disable the nomatch output | |
unsetopt nomatch 2>/dev/null | |
ls $SEARCHPATH/*/bin/activate > /dev/null 2> /dev/null | |
if [ "$?" = '0' ]; then | |
deactivate > /dev/null 2> /dev/null |