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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Title of the document</title> | |
| </head> | |
| <body> | |
| <img loading="lazy" data-lazy | |
| src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkqAcAAIUAgUW0RjgAAAAASUVORK5CYII=" |
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
| /** | |
| * Little JS snippet to automatically update the WooCommerce single product page URL with the needed parameters for the active variations' selection. | |
| * | |
| * Each time the user changes the variation selection, the URL is updated with the new parameters, so on hard refresh the selected variation is displayed. | |
| * | |
| * Also, fast way to get the direct URL to the selected variation. | |
| * | |
| * Paste it into your browser console and run it. Or use it in your theme/plugins. | |
| * | |
| * @see https://stackoverflow.com/a/73138077/13765033 |
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 pandas as pd | |
| df = pd.read_csv('large_file.csv') | |
| n = 49000 # Max number of rows you want each chunk to have | |
| chunks = [df[i:i+n].copy() for i in range(0,df.shape[0],n)] | |
| k = 1 | |
| for chunk in chunks: | |
| chunk.to_csv('data/chunk_{}.csv'.format(k), index=False) |
OlderNewer