- Windows Sysadmin bs
- download updates manually
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
def leven(s1, s2, maxDistance): | |
# get smallest string so our rows are minimized | |
s1, s2 = (s1, s2) if len(s1) <= len(s2) else (s2, s1) | |
# set lengths | |
l1, l2 = len(s1), len(s2) | |
# We are simulatng an NM matrix where n is the longer string | |
# and m is the shorter string. By doing this we can minimize | |
# memory usage to O(M). | |
# Since we are simulating the matrix we only maintain two rows |
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 Proof: | |
def __init__(self): | |
self._redo = [] | |
self._undo = [] | |
self._mystr = '' | |
def mystr(): | |
def fget(self): | |
return self._mystr |
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 win32api, win32con, time | |
def click(x, y): | |
win32api.SetCursor((X,y)) | |
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN,x,y,0,0) | |
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTUP,x,y,0,0) | |
def clean(): | |
click(1050, 200) | |
click(1050, 220) |
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 winsound | |
from subprocess import call, DEVNULL | |
print('Begin Ping Alert') | |
while call(["ping", "google.com"], stdout=DEVNULL, stderr=DEVNULL) != 0: | |
print('No net yet :(') | |
print('Web Back!!!') |
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
git config --global alias.ignorechanges = update-index --assume-unchanged | |
git config --global alias.noticechanges = update-index --no-assume-unchanged |
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
#!/usr/bin/env python | |
import os | |
import pip | |
dists = [] | |
for dist in pip.get_installed_distributions(): | |
dists.append(dist.project_name) | |
for dist_name in sorted(dists, key=lambda s: s.lower()): |
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
xs, ys, ws = [None, [1, 1, 2], [1, 2, -1], [1, 5, -2], [1, 3, -1], [1, 8, 2]], [None, -13, -4, 5, 0, 1], [1, 1, 1] | |
alpha = .01 | |
def h(j): | |
return (ws[0] * xs[j][0]) + (ws[1] * xs[j][1]) + (ws[2] * xs[j][2]) | |
def inner(inner_i): | |
return (xs[inner_j][inner_i] * (ys[inner_j] - hs[inner_j]) for inner_j in range(1, len(xs))) |
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
#include <iostream> | |
#include <map> | |
using namespace std; | |
class node{ | |
public: | |
node(int val){this->val = val; } | |
int val; | |
}; |
OlderNewer