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
^(?:(?'startcolumn'[A-Za-z]{1,3})(?'startrow'\d{1,7}):(?'endcolumn'[A-Za-z]{1,3})(?'endrow'\d{1,7}))$|^(?:(?'startcolumn'[A-Za-z]{1,3}):(?'endcolumn'[A-Za-z]{1,3}))$|^(?:(?'startcolumn'[A-Za-z]{1,3})(?'startrow'\d{1,7}))$|^(?:(?'startcolumn'[A-Za-z]{1,3})(?'startrow'\d{1,7}):(?'endcolumn'[A-Za-z]{1,3}))$|^(?:(?'startcolumn'[A-Za-z]{1,3})(?'startrow'\d{1,7}):(?'endrow'\d{1,7}))$|^(?:(?'startcolumn'[A-Za-z]{1,3}):(?'endcolumn'[A-Za-z]{1,3})(?'endrow'\d{1,7}))$|^(?:(?'startrow'\d{1,7}):(?'endrow'\d{1,7}))$|^(?:(?'startrow'\d{1,7}):(?'endcolumn'[A-Za-z]{1,3})(?'endrow'\d{1,7}))$ |
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 operator import add, sub, mul, truediv | |
import itertools | |
from typing import Generator | |
TARGET = 755 | |
NUMBERS = [3, 4, 25, 50, 75, 100] | |
OPERATIONS = {add: "+", sub: "-", mul: "*", truediv: "/"} | |
def series_to_string(series: list) -> str: |
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
""" | |
Access and log CPU temperatures. | |
Heavily adapted from | |
https://stackoverflow.com/questions/3262603/accessing-cpu-temperature-in-python | |
""" | |
import time | |
import logging | |
import sys | |
from typing import Generator |
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
[ | |
"application/*", | |
"application/0", | |
"application/1", | |
"application/apk", | |
"application/applefile", | |
"application/arj", | |
"application/armor", | |
"application/base64", | |
"application/binary", |
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 <stdio.h> | |
#include <stdlib.h> | |
#include <locale.h> | |
#include <stdbool.h> | |
#include <cstring> | |
#include <iomanip> | |
#include <iostream> | |
#include <string> | |
#include <random> | |
#include <ctime> |
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 random | |
import time | |
import lox | |
@lox.process(10) | |
def compute_squared_set(squared_set, square_sets_per_thread_proc): | |
import random | |
def compute_square(numbers): | |
"For each row, column, and diagonal check that they all sum to the same number" | |
magic = sum(numbers[:3]) |
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 pythoncom | |
import win32com.client | |
class Contact(): | |
"""Class serves as little more than an enhanced node tree.""" | |
def __init__(self, exchange_user): | |
""" | |
Establish a core COM object to work off of for subsequent properties. | |
Manager and workers are cached, in that they are only gotten once. | |
This reduces external calls if we need to access the name or job title multiple times. |
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 math import * | |
from decimal import Decimal | |
import difflib | |
from difflib import SequenceMatcher | |
def strings_to_vectors(string1,string2): | |
uniqueset = set(string1+string2) | |
string1_vector = [] | |
string2_vector = [] | |
for x in uniqueset: |
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
# pylint: disable=I1101,E1101 | |
""" | |
os for generic filesystem operations | |
argparse to accept a drive letter | |
time as a basis for creation time | |
pywintypes and win32file for windows file manipulation | |
""" | |
import os | |
import argparse | |
import time |
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
"""os, for file IO""" | |
import os | |
import re | |
import argparse | |
def files(path): | |
""" Returns a list of filenames from the given directory. | |
https://stackoverflow.com/questions/14176166/list-only-files-in-a-directory | |
""" |
NewerOlder