we will build an index for an academic book . attached is an excel with the terms
follow this guideline between the three ### lines
INTRODUCTION: WORKING WITH T&F
| import streamlit as st | |
| import json | |
| import base64 | |
| import requests | |
| from PIL import Image | |
| import os, io | |
| output_folder = "../output" | |
| if not os.path.exists(output_folder): | 
| from bs4 import BeautifulSoup | |
| import requests | |
| import re | |
| import urllib2 | |
| import os | |
| import argparse | |
| import sys | |
| import json | |
| # adapted from http://stackoverflow.com/questions/20716842/python-download-images-from-google-image-search | 
| # sudo apt install libgl1-mesa-glx libegl1-mesa libxrandr2 libxrandr2 libxss1 libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6 | |
| # wget -P /tmp https://repo.anaconda.com/archive/Anaconda3-2020.02-Linux-x86_64.sh | |
| # bash /tmp/https://repo.anaconda.com/archive/Anaconda3-2020.02-Linux-x86_64.sh | |
| # conda create --name opencv -c conda-forge opencv | |
| # conda activate opencv | |
| # pip install opencv-contrib-python | |
| # python testSource.py | |
| # ['FFMPEG', 'GSTREAMER', 'INTEL_MFX', 'MSMF', 'V4L2', 'CV_IMAGES', 'CV_MJPEG', 'UEYE'] | 
| from __future__ import division | |
| import time | |
| import Adafruit_PCA9685 | |
| from pyueye import ueye | |
| import ctypes | |
| import datetime | |
| pwm = Adafruit_PCA9685.PCA9685(address = 0x40) #1st | |
| pwm1 = Adafruit_PCA9685.PCA9685(address = 0x41) #2nd | 
| #!/usr/bin/env python | |
| # -*- coding:utf-8 -*- | |
| # extract YouTube videoids from html | |
| import re | |
| import json | |
| import urllib2 | |
| from BeautifulSoup import BeautifulSoup | |
| def get_videoids(url): | 
| #!/usr/bin/python3 | |
| """ | |
| Export your Windows Bluetooth LE keys into Linux! (arch edition) | |
| Thanks to: http://console.systems/2014/09/how-to-pair-low-energy-le-bluetooth.html | |
| discussed here: https://unix.stackexchange.com/questions/402488/dual-boot-bluetooth-device-pairing | |
| Usage: | |
| $ ./export-ble-infos.py <args> | |
| $ sudo bash -c 'cp -r ./bluetooth /var/lib' | 
| //grab a screenshot using chromedriver headless | |
| //see install of pupetter on | |
| //https://pptr.dev/ | |
| const puppeteer = require('puppeteer'); | |
| // print process.argv | |
| console.log(process.argv.length); | |
| if (process.argv.length <= 2) { | |
| console.log("Usage: " + __filename + " URL and IMAGE.jpg"); | 
| #script guidance from John G. Fisher | |
| # check his youtube https://www.youtube.com/watch?v=e6xZAISu-5E | |
| # grab all links we talked about | |
| from bs4 import BeautifulSoup | |
| import requests | |
| import re | |
| #use 'python http.server' on the directory to serve the folder. sb4 doesnt do local links | |
| inbox_path='http://localhost:8000/messages/inbox/ElBootkeh_64b09d1ba5/message.html' | |
| print(inbox_path) |