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 requests | |
import pandas as pd | |
from lxml import etree | |
r = requests.get("https://en.wikipedia.org/wiki/List_of_photovoltaic_power_stations") | |
main_page = etree.HTML(r.content) | |
list_title = main_page.xpath('.//table[contains(@class,"wikitable")]/tbody/tr/td/a/text()') | |
list_geo = main_page.xpath('.//table[contains(@class,"wikitable")]/tbody/tr//span[contains(@class,"geo-dec")]/text()') | |
zipped_list = list(zip(list_title,list_geo)) | |
df = pd.DataFrame(zipped_list) | |
df.columns = ["name", "geo_raw"] |
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
# Add Logo | |
img = openpyxl.drawing.image.Image('logo.jpg') | |
p2e = pixels_to_EMU | |
h, w = img.height, img.width | |
size = XDRPositiveSize2D(p2e(w), p2e(h)) | |
# Set image position on the top right of the Worksheet: | |
column = 8 # last column index (!!!starts from 0) | |
row = 0 # first row index (!!!starts from 0) | |
coloffset = -p2e(w) # we align the image with the right limit of the worksheet |
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
#!/bin/bash | |
# This is free and unencumbered shell script released into the public domain. | |
# | |
####################### Begin Customization Section ############################# | |
# | |
# Name of the recipe to fetch. You can run: | |
# ebook-convert --list-recipes | |
# to look for the correct name. Do not forget the .recipe suffix | |
RECIPE="La Jornada (Mexico).recipe" |
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
#!/usr/bin/python | |
import sys | |
import os | |
import hashlib | |
import pandas as pd | |
import pickle | |
def chunk_reader(fobj, chunk_size=1024): |