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 duckdb | |
| import fabduckdb | |
| import gspread | |
| import pandas as pd | |
| def read_gsheet(service_account_json_path: str, gsheets_url: str, worksheet_name: str) -> pd.DataFrame: | |
| gc = gspread.service_account(filename=service_account_json_path, scopes=gspread.auth.READONLY_SCOPES) | |
| gsheet = gc.open_by_url(gsheets_url) | |
| data = gsheet.worksheet(worksheet_name).get_all_records() |
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
| from itertools import chain, islice | |
| class splitter: | |
| """Helper class for splitat.""" | |
| def __init__(self, iterable, count): | |
| self.iterator = iter(iterable) | |
| self.count = count | |
| self.queue = [] |
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 keras.backend as K | |
| import multiprocessing | |
| import tensorflow as tf | |
| from gensim.models.word2vec import Word2Vec | |
| from keras.callbacks import EarlyStopping | |
| from keras.models import Sequential | |
| from keras.layers.core import Dense, Dropout, Flatten | |
| from keras.layers.convolutional import Conv1D |
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
| window.location.href | |
| ==================== | |
| Bookmarklet to append a string to the end of the URL. | |
| 1. Create bookmark. | |
| 2. Edit bookmark URL(Chrome) / Location(Firefox) to include this code: javascript:window.location.href=window.location.href+'REPLACETHIS'; | |
| 3. Now make use of that bookmarklet. |