Skip to content

Instantly share code, notes, and snippets.

pip freeze > requirements.txt
$ virtualenv <env_name>
$ source <env_name>/bin/activate
(<env_name>)$ pip install -r path/to/requirements.txt
@neerajkumar21
neerajkumar21 / list_to_clipboard.py
Created July 15, 2020 08:47 — forked from coreyhermanson/list_to_clipboard.py
Takes a list of strings and copies them to the Clipboard, ready to paste. Useful function if you need to copy a list of results into Excel or Notepad++. Uses Python and pyperclip module.
#!/usr/bin/env python
import pyperclip
example_list = ["Line 1", "Line 2", "Line 3", "forever and ever"]
def list_to_clipboard(output_list):
""" Check if len(list) > 0, then copy to clipboard """
if len(output_list) > 0:
pyperclip.copy('\n'.join(output_list))
import re
import requests
from urllib.parse import urlsplit
from collections import deque
from bs4 import BeautifulSoup
import pandas as pd
from google.colab import files
original_url = input("Enter the website url: ")
import request, pandas as pd
r = requests.get('http://www.worldometers.info/coronavirus/')
dfs = pd.read_html(r.text)