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
# -*- coding: utf-8 -*- | |
""" | |
Pure Python 3.6 example of doing binary space partioning for rectangles | |
Note the example is meant to be illustrative rather than performant, idiomatic or compact | |
Copyright 2019 Dustin Andrews | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |
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 win32ui | |
import win32gui | |
import win32con | |
import numpy as np | |
from matplotlib import pyplot as plt | |
""" | |
Search open windows programs for a title containing the search_str | |
and set hwnd |
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
class Bandit: | |
def __init__(self,arms : int): | |
self.arms = [] | |
for i in range(arms): | |
self.arms.append(np.random.rand()) | |
self.action_count = arms | |
def step(self, action: int): | |
reward = 0 |
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 gensim.models.word2vec import Word2Vec | |
from gensim import corpora, models, similarities | |
from gensim.models.phrases import Phrases | |
import numpy as np | |
import logging | |
logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO) | |
from sklearn.metrics import roc_curve, auc | |
import matplotlib.pyplot as plt | |
import re | |
import codecs |