Grab the nteract
wget https://github.com/nteract/nteract/releases/download/v0.0.15/nteract-0.0.15-linux.tar.gz
tar -xvf "nteract-0.0.15-linux.tar.gz"
sudo pip3 install hy ipython ipykernel
python3 -m ipykernel install --user
#! /usr/bin/env hy | |
(import requests | |
string | |
[bs4 [BeautifulSoup]] | |
[sys [argv]]) | |
(defn get_page [link] | |
(-> (. (.get requests link) text) |
wget https://github.com/nteract/nteract/releases/download/v0.0.15/nteract-0.0.15-linux.tar.gz
tar -xvf "nteract-0.0.15-linux.tar.gz"
sudo pip3 install hy ipython ipykernel
python3 -m ipykernel install --user
import asyncio | |
from urllib.request import urlopen | |
async def produce_lines(filename): | |
try: | |
with open(filename, 'r') as file: | |
for line in file: | |
yield line.rstrip('\n') | |
await asyncio.sleep(1) |
import asyncio | |
from os import devnull | |
from urllib.request import urlopen | |
from urllib.parse import quote | |
from subprocess import call | |
async def produce_lines(filename): | |
try: | |
with open(filename, 'r') as file: |
import asyncio | |
from urllib.request import urlopen | |
async def produce_lines(filename, delay): | |
try: | |
with open(filename, 'r') as file: | |
for line in file: | |
yield line.rstrip('\n') | |
await asyncio.sleep(delay) |
<script language= "JavaScript"> | |
eval(function(p, a, c, k, e, r) { | |
e = function(c) { | |
return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36)) | |
}; | |
if (!''.replace(/^/, String)) { | |
while (c--) r[e(c)] = k[c] || e(c); | |
k = [function(e) { | |
return r[e] | |
}]; |
I hereby claim:
To claim this, I am signing this object:
[redshift] | |
adjustment-method=randr | |
location-provider=manual | |
temp-day=3800 | |
temp-night=3600 | |
brightness-day=0.6 | |
brightness-night=0.6 | |
gamma-day=0.9 | |
gamma-night=0.8 | |
transition=1 |
import argparse | |
import json | |
from urllib.request import Request, urlopen | |
import time | |
def request_until_succeed(url): | |
req = Request(url) | |
success = False | |
while success is False: |