A compilation of KYE episodes, featured books, and linked articles.
This file contains 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
""" | |
Prints all possible puns of the form: "Darth *" Where * is every word that both | |
starts with "in" and has a negative-connotation, with the "in" removed. This is | |
based on a joke about the pattern of naming for most sith in the Star Wars franchise, such as | |
Darth Sidious (i.e. insidious) or Darth Vader (i.e. invader). The results are | |
funny, I promise. My favorite is "Darth Fection". | |
""" | |
import requests as r | |
import numpy as np |
This file contains 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 os, json | |
def tree2dict(abs2rel, rel2dir, exclude_dirs): | |
""" | |
abs2rel: absolute path to the relative location ('C:\\User\\MyUsername\\Documents\\') | |
rel2dir: relative path to the dict to copy ('myproject\\') | |
exclude_dirs: directories to exclude (['myproject\\.git','myproject\\secretfiles') | |
""" | |
os.chdir(abs2rel) | |
wanted_dir = lambda thisdir, exclude_dirs: not any(p in thisdir for p in exclude_dirs) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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 transformers import GPT2Tokenizer, GPT2LMHeadModel,TrainingArguments, Trainer | |
import torch | |
from torch.utils.data import Dataset | |
from sklearn.model_selection import train_test_split | |
device = 'cpu' | |
if torch.cuda.is_available(): | |
device = 'cuda' |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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 itertools as it | |
import random | |
# https://stackoverflow.com/questions/63584103/passing-a-list-of-strings-to-be-put-into-trie | |
class TrieNode: | |
def __init__(self): | |
self.end = False | |
self.children = {} | |
def all_words(self, prefix): |
This file contains 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
tabcmd login -s <tableausiteurl> -u <username> -p <password> | |
tabcmd get "workbooks.xml" |
As you can see from this image, on windows 10, selecting the videos tab shows the control panel items, and in fact every button on this menu appears to show what should be the submenu for the next button up. The first item, the "Desktop" button shows a blank menu that says "(empty)". I think there's some kind of 0-1 indexing issue here.
OlderNewer